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

C / C++ / MFC

 
AnswerRe: How can find virus activity problem in client-server application? Pin
Moak31-Jan-10 23:21
MemberMoak31-Jan-10 23:21 
QuestionHow to config RAID in C++ with my own APP instead of using MS disk manager? Pin
terrysir31-Jan-10 16:33
Memberterrysir31-Jan-10 16:33 
QuestionA pointer of variable or a function? Pin
fitatc31-Jan-10 13:55
Memberfitatc31-Jan-10 13:55 
AnswerRe: A pointer of variable or a function? Pin
loyal ginger31-Jan-10 14:47
Memberloyal ginger31-Jan-10 14:47 
GeneralRe: A pointer of variable or a function? [modified] Pin
fitatc31-Jan-10 15:11
Memberfitatc31-Jan-10 15:11 
AnswerRe: A pointer of variable or a function? Pin
Graham Breach31-Jan-10 21:10
MemberGraham Breach31-Jan-10 21:10 
GeneralRe: A pointer of variable or a function? Pin
fitatc31-Jan-10 21:15
Memberfitatc31-Jan-10 21:15 
QuestionTest whether iostream is binary or plain text Pin
Skippums31-Jan-10 10:18
MemberSkippums31-Jan-10 10:18 
I would like to test whether a stream was opened for binary read/writes or for plain text. The goal of my code is to output the data in a MyClass object in two different ways depending on this stream property.
class MyClass {
    friend ostream& operator <<(ostream& stream, const MyClass& obj);
    friend istream& operator >>(istream& stream,       MyClass& obj);
}
ostream& operator <<(ostream& stream, const MyClass& obj) {
    // How do I do the following?
    if ([stream is opened for binary writes]) {
        ...
    } else {
        ...
    }
}
istream& operator >>(istream& stream,       MyClass& obj) {
    // How do I do the following?
    if ([stream is opened for binary reads]) {
        ...
    } else {
        ...
    }
}
Would doing such a thing be poor design, or is this pretty acceptable? Thanks,

Sounds like somebody's got a case of the Mondays

-Jeff

AnswerRe: Test whether iostream is binary or plain text Pin
Rozis31-Jan-10 12:00
MemberRozis31-Jan-10 12:00 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums31-Jan-10 12:44
MemberSkippums31-Jan-10 12:44 
AnswerRe: Test whether iostream is binary or plain text [modified] Pin
BonshatS1-Feb-10 2:26
MemberBonshatS1-Feb-10 2:26 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums29-Oct-10 14:48
MemberSkippums29-Oct-10 14:48 
GeneralRe: Test whether iostream is binary or plain text Pin
BonshatS29-Oct-10 16:50
MemberBonshatS29-Oct-10 16:50 
GeneralRe: Test whether iostream is binary or plain text Pin
Skippums30-Oct-10 7:00
MemberSkippums30-Oct-10 7:00 
Questionc++ titlebar color change Pin
RenateD31-Jan-10 4:05
MemberRenateD31-Jan-10 4:05 
AnswerRe: c++ titlebar color change Pin
enhzflep31-Jan-10 4:17
Memberenhzflep31-Jan-10 4:17 
AnswerRe: c++ titlebar color change Pin
RenateD31-Jan-10 4:38
MemberRenateD31-Jan-10 4:38 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 5:47
Memberenhzflep31-Jan-10 5:47 
GeneralRe: c++ titlebar color change Pin
RenateD31-Jan-10 6:40
MemberRenateD31-Jan-10 6:40 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 6:58
Memberenhzflep31-Jan-10 6:58 
GeneralRe: c++ titlebar color change Pin
RenateD31-Jan-10 9:19
MemberRenateD31-Jan-10 9:19 
GeneralRe: c++ titlebar color change Pin
enhzflep31-Jan-10 17:46
Memberenhzflep31-Jan-10 17:46 
QuestionAPI For ClipBoard Pin
Anil Kumar.Arvapalli31-Jan-10 2:09
MemberAnil Kumar.Arvapalli31-Jan-10 2:09 
AnswerRe: API For ClipBoard Pin
Ed.Poore31-Jan-10 2:24
MemberEd.Poore31-Jan-10 2:24 
AnswerRe: API For ClipBoard Pin
Richard MacCutchan31-Jan-10 2:48
mveRichard MacCutchan31-Jan-10 2:48 

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.