Click here to Skip to main content
15,887,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to write/read in text file with mfc project?? Pin
Maximilien11-Oct-11 7:55
Maximilien11-Oct-11 7:55 
AnswerRe: how to write/read in text file with mfc project?? Pin
Chris Meech11-Oct-11 7:59
Chris Meech11-Oct-11 7:59 
AnswerRe: how to write/read in text file with mfc project?? Pin
Madhu Nair11-Oct-11 8:02
Madhu Nair11-Oct-11 8:02 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 8:19
antonio34311-Oct-11 8:19 
GeneralRe: how to write/read in text file with mfc project?? Pin
Richard MacCutchan11-Oct-11 8:36
mveRichard MacCutchan11-Oct-11 8:36 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 8:51
antonio34311-Oct-11 8:51 
GeneralRe: how to write/read in text file with mfc project?? Pin
Richard MacCutchan11-Oct-11 10:58
mveRichard MacCutchan11-Oct-11 10:58 
QuestionRe: how to write/read in text file with mfc project?? Pin
David Crow11-Oct-11 10:28
David Crow11-Oct-11 10:28 
antonio343 wrote:
f1.Open(path, CFile::modeCreate | CFile::modeRead || CFile::typeText);
TCHAR buf[100];
f1.ReadString(buf, 99);

You are creating an empty file and then attempting to read from it. Is that really what you want?

Also, you may want to revise your usage of the | and || operators.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous


AnswerRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 14:12
antonio34311-Oct-11 14:12 
GeneralRe: how to write/read in text file with mfc project?? Pin
enhzflep11-Oct-11 14:32
enhzflep11-Oct-11 14:32 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 15:03
antonio34311-Oct-11 15:03 
GeneralRe: how to write/read in text file with mfc project?? Pin
enhzflep11-Oct-11 15:39
enhzflep11-Oct-11 15:39 
QuestionHow to get list of COM Ports in Win32 Pin
pandit8411-Oct-11 0:57
pandit8411-Oct-11 0:57 
AnswerRe: How to get list of COM Ports in Win32 Pin
App_11-Oct-11 1:03
App_11-Oct-11 1:03 
AnswerRe: How to get list of COM Ports in Win32 Pin
Madhu Nair11-Oct-11 1:15
Madhu Nair11-Oct-11 1:15 
GeneralRe: How to get list of COM Ports in Win32 Pin
Albert Holguin11-Oct-11 4:23
professionalAlbert Holguin11-Oct-11 4:23 
GeneralRe: How to get list of COM Ports in Win32 Pin
Madhu Nair11-Oct-11 6:44
Madhu Nair11-Oct-11 6:44 
GeneralRe: How to get list of COM Ports in Win32 Pin
Albert Holguin12-Oct-11 5:16
professionalAlbert Holguin12-Oct-11 5:16 
GeneralRe: How to get list of COM Ports in Win32 Pin
Jonathan Davies17-Oct-11 1:22
Jonathan Davies17-Oct-11 1:22 
AnswerRe: CreateFile function Pin
Software_Developer11-Oct-11 3:01
Software_Developer11-Oct-11 3:01 
GeneralRe: CreateFile function Pin
Richard Andrew x6411-Oct-11 11:33
professionalRichard Andrew x6411-Oct-11 11:33 
GeneralRe: CreateFile function Pin
Peter_in_278011-Oct-11 12:06
professionalPeter_in_278011-Oct-11 12:06 
GeneralRe: CreateFile function Pin
Albert Holguin12-Oct-11 5:17
professionalAlbert Holguin12-Oct-11 5:17 
GeneralRe: CreateFile function Pin
Albert Holguin12-Oct-11 5:19
professionalAlbert Holguin12-Oct-11 5:19 
GeneralRe: CreateFile function Pin
Software_Developer12-Oct-11 9:28
Software_Developer12-Oct-11 9:28 

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.