B
bacadman
I have a variable that seems to be placing a newline when outputting to
a file. How can I test to see if this is the case.
a file. How can I test to see if this is the case.
bacadman said:I have a variable that seems to be placing a newline when outputting to
a file. How can I test to see if this is the case.
I have a variable that seems to be placing a newline when outputting to
a file. How can I test to see if this is the case.
I have a variable that seems to be placing a newline when outputting to
a file. How can I test to see if this is the case.
if(line[strlen(line) - 1] == '\n')
line[strlen(line) - 1] = '\0';
if(line[strlen(line) - 1] == '\n')
line[strlen(line) - 1] = '\0';
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.