Click here to Skip to main content
15,890,897 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
Moak31-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
terrysir31-Jan-10 16:33 
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 
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
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 
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 

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.