Click here to Skip to main content
15,899,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem with read in CFile class Pin
Richard MacCutchan21-Oct-11 9:26
mveRichard MacCutchan21-Oct-11 9:26 
GeneralRe: Problem with read in CFile class Pin
David Crow21-Oct-11 10:24
David Crow21-Oct-11 10:24 
GeneralRe: Problem with read in CFile class Pin
antonio34321-Oct-11 22:26
antonio34321-Oct-11 22:26 
GeneralRe: Problem with read in CFile class Pin
Richard MacCutchan22-Oct-11 0:07
mveRichard MacCutchan22-Oct-11 0:07 
GeneralRe: Problem with read in CFile class Pin
antonio34322-Oct-11 0:33
antonio34322-Oct-11 0:33 
GeneralRe: Problem with read in CFile class Pin
Richard MacCutchan22-Oct-11 0:56
mveRichard MacCutchan22-Oct-11 0:56 
GeneralRe: Problem with read in CFile class Pin
antonio34322-Oct-11 1:09
antonio34322-Oct-11 1:09 
GeneralRe: Problem with read in CFile class Pin
Richard MacCutchan22-Oct-11 1:44
mveRichard MacCutchan22-Oct-11 1:44 
There is no problem with what you suggest, you merely need to ensure that what you try to read back exactly mirrors what you write. This means that you must read back the exact number of bytes that you have written in the first place. With elementary items (int, double, char etc.) this is not difficult, but with strings you need to add some extra information to know how many characters to read in; you could do this by adding an integer in front of the string that specifies its length. Alternatively, use one of the formatting functions to convert all your data to string items and use some form of field separation (e.g. CSV, XML) to write in lines of text which you can then reconvert when reading back.
Unrequited desire is character building. OriginalGriff


GeneralRe: Problem with read in CFile class Pin
antonio34322-Oct-11 8:21
antonio34322-Oct-11 8:21 
GeneralRe: Problem with read in CFile class Pin
Chuck O'Toole22-Oct-11 9:44
Chuck O'Toole22-Oct-11 9:44 
GeneralRe: Problem with read in CFile class Pin
Richard MacCutchan22-Oct-11 21:33
mveRichard MacCutchan22-Oct-11 21:33 
GeneralRe: Problem with read in CFile class Pin
antonio34323-Oct-11 0:43
antonio34323-Oct-11 0:43 
QuestionMFC dialog + ResizableLib + splitter Pin
Dialecticus21-Oct-11 5:05
Dialecticus21-Oct-11 5:05 
AnswerRe: MFC dialog + ResizableLib + splitter Pin
Richard MacCutchan21-Oct-11 6:26
mveRichard MacCutchan21-Oct-11 6:26 
AnswerRe: MFC dialog + ResizableLib + splitter Pin
TheGreatAndPowerfulOz21-Oct-11 9:17
TheGreatAndPowerfulOz21-Oct-11 9:17 
QuestionProblem with MPR.lib/MFC90.DLL Pin
tasumisra20-Oct-11 17:41
tasumisra20-Oct-11 17:41 
AnswerRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan20-Oct-11 21:41
mveRichard MacCutchan20-Oct-11 21:41 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
tasumisra20-Oct-11 21:58
tasumisra20-Oct-11 21:58 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan20-Oct-11 23:01
mveRichard MacCutchan20-Oct-11 23:01 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
tasumisra24-Oct-11 2:03
tasumisra24-Oct-11 2:03 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan24-Oct-11 3:46
mveRichard MacCutchan24-Oct-11 3:46 
AnswerRe: Fix the registry Pin
Goto_Label_21-Oct-11 6:59
Goto_Label_21-Oct-11 6:59 
QuestionvString Pin
Tyler Elric20-Oct-11 16:48
Tyler Elric20-Oct-11 16:48 
AnswerRe: vString Pin
Tyler Elric20-Oct-11 16:57
Tyler Elric20-Oct-11 16:57 
AnswerRe: vString Pin
Richard Andrew x6420-Oct-11 18:02
professionalRichard Andrew x6420-Oct-11 18:02 

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.