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.

4
  • 1st:So you are saying i sould change x to x-1? Commented Jan 20, 2017 at 14:57
  • And about the 2nd,it worked for me in the Load function,it properly changed my array in main too. Commented Jan 20, 2017 at 14:58
  • @Edward 1st, Maybe. Your code's too convoluted to easily tell. Commented Jan 20, 2017 at 15:14
  • @Edward 2nd: If realloc moved the memory, array gets left pointing at the old data. One fix is to make enterd return a pointer to the new data. Then use array = enterd(array, &counter) Commented Jan 20, 2017 at 15:17