Reputation: 25
I need to do a or linebreak add 2 spaces at end
Upvotes: 0
Views: 67
Reputation: 179
Another solution is some kind of a trick without using realloc()
. You can read your file twice.
P.S. In the future, try to be more specific while writing questions titles.
Upvotes: 1
Reputation: 591
You need to use some sort of Realloc() function. This function is used to extend the allocated size. The program should be something like that:
Of course this is just one solution, and there may be others.
Upvotes: 1