Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFile, CStdioFile

Status
Not open for further replies.

trent101

Programmer
Nov 4, 2005
50
0
0
AU
I am outputing text to a text file using the CStdioFile classes WriteText() function. However, for the life of of me i cannot fing out how to start a new line! I want to be able to write a line of text, and then 'hit enter' and then write another line of text on the line below. Does anyone know how to do this? Any help would be appreciated. Thankyou
 
CStdioFile::WriteString(LPCTSTR lpsz)?
MSDN said:
Any newline character in lpsz is written to the file as a carriage return–linefeed pair.
So "This is\nthe 2nd line"...
As usually in C/C++ text streams...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top