Click here to Skip to main content
14,697,568 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
QuestionA pointer of variable or a function? Pin
fitatc31-Jan-10 14:55
Memberfitatc31-Jan-10 14:55 
AnswerRe: A pointer of variable or a function? Pin
loyal ginger31-Jan-10 15:47
Memberloyal ginger31-Jan-10 15:47 
GeneralRe: A pointer of variable or a function? [modified] Pin
fitatc31-Jan-10 16:11
Memberfitatc31-Jan-10 16:11 
AnswerRe: A pointer of variable or a function? Pin
Graham Breach31-Jan-10 22:10
MemberGraham Breach31-Jan-10 22:10 
GeneralRe: A pointer of variable or a function? Pin
fitatc31-Jan-10 22:15
Memberfitatc31-Jan-10 22:15 
QuestionTest whether iostream is binary or plain text Pin
Skippums31-Jan-10 11:18
MemberSkippums31-Jan-10 11:18 
AnswerRe: Test whether iostream is binary or plain text Pin
Rozis31-Jan-10 13:00
MemberRozis31-Jan-10 13:00 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums31-Jan-10 13:44
MemberSkippums31-Jan-10 13: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 3:26
MemberBonshatS1-Feb-10 3:26 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums29-Oct-10 15:48
MemberSkippums29-Oct-10 15:48 
GeneralRe: Test whether iostream is binary or plain text Pin
BonshatS29-Oct-10 17:50
MemberBonshatS29-Oct-10 17:50 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums30-Oct-10 8:00
MemberSkippums30-Oct-10 8:00 
Questionc++ titlebar color change Pin
RenateD31-Jan-10 5:05
MemberRenateD31-Jan-10 5:05 
AnswerRe: c++ titlebar color change Pin
enhzflep31-Jan-10 5:17
Memberenhzflep31-Jan-10 5:17 
AnswerRe: c++ titlebar color change Pin
RenateD31-Jan-10 5:38
MemberRenateD31-Jan-10 5:38 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 6:47
Memberenhzflep31-Jan-10 6:47 
GeneralRe: c++ titlebar color change Pin
RenateD31-Jan-10 7:40
MemberRenateD31-Jan-10 7:40 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 7:58
Memberenhzflep31-Jan-10 7:58 
GeneralRe: c++ titlebar color change Pin
RenateD31-Jan-10 10:19
MemberRenateD31-Jan-10 10:19 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 18:46
Memberenhzflep31-Jan-10 18:46 
QuestionAPI For ClipBoard Pin
Anil Kumar.Arvapalli31-Jan-10 3:09
MemberAnil Kumar.Arvapalli31-Jan-10 3:09 
AnswerRe: API For ClipBoard Pin
Ed.Poore31-Jan-10 3:24
MemberEd.Poore31-Jan-10 3:24 
AnswerRe: API For ClipBoard Pin
Richard MacCutchan31-Jan-10 3:48
mveRichard MacCutchan31-Jan-10 3:48 
Questionsave file error! Pin
wbgxx31-Jan-10 2:54
Memberwbgxx31-Jan-10 2:54 
AnswerRe: save file error! Pin
Richard MacCutchan31-Jan-10 3:44
mveRichard MacCutchan31-Jan-10 3: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.