Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

18
  • 2
    You still don't need a double pointer, nor should you cast the return value of realloc(). Commented Jul 19, 2013 at 14:38
  • @H2CO3, I'm not there yet, the function doesn't even get realloc(). Commented Jul 19, 2013 at 14:39
  • @H2CO3 and I think you're wrong with the casting, since realloc() is a void * function I need explicit casting. Commented Jul 19, 2013 at 14:40
  • @Quaker No, you are wrong. Commented Jul 19, 2013 at 14:41
  • 1
    I don't think so. Every time you find a different power then the one of the previous MONOM you should set powerIndex to the index of that new MONOM not just ++. Or you have to shrink your array immediately whenever you find a MONOM with the same power then the one before. Commented Jul 19, 2013 at 15:05