Click here to Skip to main content
15,896,207 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionLANGID Pin
zon_cpp11-Oct-11 20:52
zon_cpp11-Oct-11 20:52 
AnswerRe: LANGID Pin
Richard MacCutchan11-Oct-11 21:42
mveRichard MacCutchan11-Oct-11 21:42 
AnswerRe: LANGID Pin
Richard MacCutchan11-Oct-11 23:18
mveRichard MacCutchan11-Oct-11 23:18 
AnswerRe: LANGID Pin
Randor 11-Oct-11 23:34
professional Randor 11-Oct-11 23:34 
QuestionCListCtrl Pin
john563211-Oct-11 20:43
john563211-Oct-11 20:43 
AnswerRe: CListCtrl Pin
zon_cpp11-Oct-11 21:03
zon_cpp11-Oct-11 21:03 
GeneralRe: CListCtrl Pin
john563211-Oct-11 22:00
john563211-Oct-11 22:00 
GeneralRe: CListCtrl Pin
Randor 11-Oct-11 23:10
professional Randor 11-Oct-11 23:10 
AnswerRe: CListCtrl Pin
Rolf Kristensen12-Oct-11 2:24
Rolf Kristensen12-Oct-11 2:24 
Questionhow to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 7:29
antonio34311-Oct-11 7:29 
AnswerRe: how to write/read in text file with mfc project?? Pin
Richard MacCutchan11-Oct-11 7:49
mveRichard MacCutchan11-Oct-11 7:49 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 7:53
antonio34311-Oct-11 7:53 
GeneralRe: how to write/read in text file with mfc project?? Pin
Richard MacCutchan11-Oct-11 8:08
mveRichard MacCutchan11-Oct-11 8:08 
GeneralRe: how to write/read in text file with mfc project?? Pin
antonio34311-Oct-11 8:30
antonio34311-Oct-11 8:30 
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 
In your original code you were writing from an uninitialised buffer, hence the garbage recorded in your file. Check the logic of your code thus:

  1. Create the file with access for writing
  2. Write some text either from a constant string, or from some data built by the program
  3. Close the file
  4. Open the file with access for reading
  5. Read the text into a buffer
  6. Close the file

In each case check the results of your function calls to ensure that your code has completed without error. You can also create your file manually using Notepad or similar text editor.
Unrequited desire is character building. OriginalGriff


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 
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 

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.