Print formatting

Pages: 12
Actually, I was wrong. It's not just your fillString function. It's because you had the array initially declared to be 100 elements long. There are two things you can do.

You could either try to dynamically allocate memory to your array in order to resize it to exactly the same number of words as in your input file.

Or you could just change your print function to ignore any words that have a size of 0.

The first is a bit harder than the second.
Topic archived. No new replies allowed.
Pages: 12