September 11th, 2003, 10:42 AM
Okay, here is what I am doing. I am currently able to save a string into a file. The problem is when I save a second string to the file the two strings are tight next to each other. I need them to be on seperate lines. So my questions is this, how do you either append the end of line signal to the first string. Or send the End of Line signal right afterwards.
I attempted to use the VK_RETURN function, but that is not working. There is a possibility I am implementing that function incorrectly. Okay, thanks for the help
September 11th, 2003, 11:26 AM
I assume that this is to a text file.
/* code in which a string has been written to aString */
/* now write it to file pointer to by FILE *fp */
September 11th, 2003, 12:37 PM
assuming the first string is named s1, do one of the following before writing it to the file:
September 11th, 2003, 02:03 PM
just wanted to say, thanks alot. I had tried something like that, but it did not work. I did not think it would be that simple.
September 11th, 2003, 02:47 PM
Oops! I forgot the text-file-specific functions fputs and fgets. I do primarily embedded programming, so I don't do that much file I/O.
You still need to append the '\n' with fputs, but fgets will read in one entire line of text up to and including the '\n'.