Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating controls in the client area Pin
Igor Sukhov11-Jun-01 22:56
Igor Sukhov11-Jun-01 22:56 
QuestionDeleting folders with SHFileOperation? Pin
Jim A. Johnson11-Jun-01 9:50
Jim A. Johnson11-Jun-01 9:50 
AnswerRe: Deleting folders with SHFileOperation? Pin
Jim A. Johnson12-Jun-01 5:55
Jim A. Johnson12-Jun-01 5:55 
GeneralAdding resource(bitmap) in run-time. Pin
11-Jun-01 9:26
suss11-Jun-01 9:26 
GeneralRe: Adding resource(bitmap) in run-time. Pin
Igor Sukhov11-Jun-01 9:32
Igor Sukhov11-Jun-01 9:32 
GeneralAbout VC++ 7.0 ... Pin
Hadi Rezaee11-Jun-01 7:05
Hadi Rezaee11-Jun-01 7:05 
GeneralRe: About VC++ 7.0 ... Pin
2sky11-Jun-01 7:54
2sky11-Jun-01 7:54 
GeneralCarriage return/Line feed Pin
RobJones11-Jun-01 6:34
RobJones11-Jun-01 6:34 
Hello,
I’m trying to write 3 strings out to a text file but I need each string to be on a separate line.. Here is what I have tried..

CFile fileEditText;

if(fileEditText.Open("c:\\text.txt",
CFile::modeCreate + CFile::modeWrite))
{
//Write out the full string
fileEditText.Write(
strFirstline+"\n\r"+strSecondline+"\n\r"+strThird+"\n\r",length.GetLength());
//Close the file
fileEditText.Close();
}

I've tried every combo of "\n" "\r" etc..

It still writes out the 3 strings in one continuous line in the text file..

Any help would be appreciated.

THANKS,
Confused | :confused:

Rob
GeneralRe: Carriage return/Line feed Pin
Michael Dunn11-Jun-01 6:39
sitebuilderMichael Dunn11-Jun-01 6:39 
GeneralRe: Carriage return/Line feed Pin
Carlos Antollini11-Jun-01 6:46
Carlos Antollini11-Jun-01 6:46 
GeneralRe: Carriage return/Line feed Pin
RobJones11-Jun-01 7:16
RobJones11-Jun-01 7:16 
GeneralMDI Window List Pin
2sky11-Jun-01 6:14
2sky11-Jun-01 6:14 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 6:29
Tomasz Sowinski11-Jun-01 6:29 
GeneralRe: MDI Window List Pin
2sky11-Jun-01 6:54
2sky11-Jun-01 6:54 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 7:00
Tomasz Sowinski11-Jun-01 7:00 
GeneralRe: MDI Window List Pin
2sky11-Jun-01 7:41
2sky11-Jun-01 7:41 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 7:49
Tomasz Sowinski11-Jun-01 7:49 
GeneralRe: MDI Window List Pin
2sky11-Jun-01 8:17
2sky11-Jun-01 8:17 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 8:38
Tomasz Sowinski11-Jun-01 8:38 
GeneralRe: MDI Window List Pin
2sky11-Jun-01 8:45
2sky11-Jun-01 8:45 
GeneralRe: MDI Window List Pin
Tomasz Sowinski11-Jun-01 9:04
Tomasz Sowinski11-Jun-01 9:04 
GeneralRe: MDI Window List Pin
2sky11-Jun-01 9:13
2sky11-Jun-01 9:13 
GeneralRe: deleteing window menu Pin
Shashikant_200622-Dec-08 1:15
Shashikant_200622-Dec-08 1:15 
GeneralCTreeCtrl Brounding Rectangle Pin
jerry0davis11-Jun-01 6:04
jerry0davis11-Jun-01 6:04 
GeneralRe: CTreeCtrl Brounding Rectangle Pin
Tomasz Sowinski11-Jun-01 6:20
Tomasz Sowinski11-Jun-01 6:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.