Click here to Skip to main content
15,886,724 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionA pointer of variable or a function? Pin
fitatc31-Jan-10 13:55
fitatc31-Jan-10 13:55 
AnswerRe: A pointer of variable or a function? Pin
loyal ginger31-Jan-10 14:47
loyal ginger31-Jan-10 14:47 
GeneralRe: A pointer of variable or a function? [modified] Pin
fitatc31-Jan-10 15:11
fitatc31-Jan-10 15:11 
AnswerRe: A pointer of variable or a function? Pin
Graham Breach31-Jan-10 21:10
Graham Breach31-Jan-10 21:10 
GeneralRe: A pointer of variable or a function? Pin
fitatc31-Jan-10 21:15
fitatc31-Jan-10 21:15 
QuestionTest whether iostream is binary or plain text Pin
Skippums31-Jan-10 10:18
Skippums31-Jan-10 10:18 
AnswerRe: Test whether iostream is binary or plain text Pin
Rozis31-Jan-10 12:00
Rozis31-Jan-10 12:00 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums31-Jan-10 12:44
Skippums31-Jan-10 12:44 
Ok, let me rephrase... one of the members of MyClass is an array. If the user wants to output my class in a human-readable form, I want to print the array as "[elem1, elem2, ... elemN]". If not, then I want to output the array length followed by each element in a binary representation. Now, when someone tries to output my class as "cout << MyClassInstance", it should be the human-readable version. When serializing the class to a file for later reloads, I want to output the binary version. How can I infer which version to use? I could conceivably write a specific implementation for ifstream and ofstream so I always read/write the non-human-readable version to a file, but that isn't really what I am trying to do. I could also write a specific method to serialize vs. just outputting my class, but again, I don't know what the standard way of doing this is. Thanks for any insight,

Sounds like somebody's got a case of the Mondays

-Jeff

AnswerRe: Test whether iostream is binary or plain text [modified] Pin
BonshatS1-Feb-10 2:26
BonshatS1-Feb-10 2:26 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums29-Oct-10 14:48
Skippums29-Oct-10 14:48 
GeneralRe: Test whether iostream is binary or plain text Pin
BonshatS29-Oct-10 16:50
BonshatS29-Oct-10 16:50 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums30-Oct-10 7:00
Skippums30-Oct-10 7:00 
Questionc++ titlebar color change Pin
RenateD31-Jan-10 4:05
RenateD31-Jan-10 4:05 
AnswerRe: c++ titlebar color change Pin
enhzflep31-Jan-10 4:17
enhzflep31-Jan-10 4:17 
AnswerRe: c++ titlebar color change Pin
RenateD31-Jan-10 4:38
RenateD31-Jan-10 4:38 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 5:47
enhzflep31-Jan-10 5:47 
GeneralRe: c++ titlebar color change Pin
RenateD31-Jan-10 6:40
RenateD31-Jan-10 6:40 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 6:58
enhzflep31-Jan-10 6:58 
GeneralRe: c++ titlebar color change Pin
RenateD31-Jan-10 9:19
RenateD31-Jan-10 9:19 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 17:46
enhzflep31-Jan-10 17:46 
QuestionAPI For ClipBoard Pin
Anil Kumar.Arvapalli31-Jan-10 2:09
Anil Kumar.Arvapalli31-Jan-10 2:09 
AnswerRe: API For ClipBoard Pin
Ed.Poore31-Jan-10 2:24
Ed.Poore31-Jan-10 2:24 
AnswerRe: API For ClipBoard Pin
Richard MacCutchan31-Jan-10 2:48
mveRichard MacCutchan31-Jan-10 2:48 
Questionsave file error! Pin
wbgxx31-Jan-10 1:54
wbgxx31-Jan-10 1:54 
AnswerRe: save file error! Pin
Richard MacCutchan31-Jan-10 2:44
mveRichard MacCutchan31-Jan-10 2:44 

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.