Basically what i'm trying to do (sorry if this has already been answered; i haven't found anything like what i need.) is read in a file (text based) and have 3 variables. 1) Name, 2) Another name, 3) Unknown length of a message. It is in a C program and fscanf just isn't cutting it for me. I have tried using tokens and so forth and cannot achieve what I'm after. The one time I was able to read it in properly, I couldn't get the data that was read in to copy to a single variable. What will essentially happen is i'll have the data read in to some variables and then copy them to an array/structure. When i try to copy the data from the variables to another single variable, it either overwrites the existing data or will not add spaces (runsthemtogether). I have somehow deleted all the code that worked in attempts to get it working properly so I really don't have anything useful to go on. Does anyone know of a page i can reference or know how to do what i'm wanting to do? Thanks for reading.
Also: The file has an unknown amount of lines. The names are only going to be 1 word each (no spaces or anything). The message may or may not be seperated by spaces and can be one word or many words.