Thanks for your help so far.
I have tried te strtok command as suggested and it does indeed change the contents to just the surname, "Bloggs". However, would I need to add an EOS terminator to the end of the "Bloggs" string?
The reason I ask is in my program I am comparing the values held in a...
Hey,
I have been writing a simple program in C which uses fget to read in the first line of a text file into an array called lines[0].
The line of text is a name in the form "Bloggs, Joe" which is what is stored in the array.
However, I only really want to store the surname in the array. i.e...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.