How do I use fgetc to read from a text file and separate the text in it?
Posted on 2011-03-12
I have been trying to take a list of text from a file, and is not really sure on how to do that.
Currently it is delimited by ',' and '.'
I want to take out all the characters between '.' and later characters by ',', and I have no idea how many characters there may be. Eventually I need to print it out through just one string and I have to give it a newline in between.
tom and jerry,collection.peter pan,rental.
Will I need to create many many char types to store them all and to finally add it to one variable for my formatting?
I have been up all day and night trying all kinds of stuff but I keep getting stuck.
I am new to C++, so I would appreciate any detail explanation. Thanks!