Click here to Skip to main content
15,918,333 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Process and memory Pin
Steve Thresher16-Aug-10 3:19
Steve Thresher16-Aug-10 3:19 
QuestionChange collapse/expand icons in treeview Pin
Jamie Kenyon15-Aug-10 1:17
Jamie Kenyon15-Aug-10 1:17 
AnswerRe: Change collapse/expand icons in treeview Pin
Richard MacCutchan15-Aug-10 2:15
mveRichard MacCutchan15-Aug-10 2:15 
GeneralMessage Removed Pin
15-Aug-10 9:33
Jamie Kenyon15-Aug-10 9:33 
GeneralRe: Change collapse/expand icons in treeview Pin
Richard MacCutchan15-Aug-10 21:25
mveRichard MacCutchan15-Aug-10 21:25 
AnswerRe: Change collapse/expand icons in treeview Pin
Matt U.15-Aug-10 4:23
Matt U.15-Aug-10 4:23 
QuestionDiff bw BOOL and bool?? Pin
AmbiguousName14-Aug-10 22:56
AmbiguousName14-Aug-10 22:56 
AnswerRe: Diff bw BOOL and bool?? Pin
Richard MacCutchan15-Aug-10 0:50
mveRichard MacCutchan15-Aug-10 0:50 
AnswerRe: Diff bw BOOL and bool?? Pin
bleedingfingers15-Aug-10 2:59
bleedingfingers15-Aug-10 2:59 
AnswerRe: Diff bw BOOL and bool?? Pin
Aescleal15-Aug-10 7:41
Aescleal15-Aug-10 7:41 
AnswerRe: Diff bw BOOL and bool?? Pin
Eugen Podsypalnikov16-Aug-10 0:33
Eugen Podsypalnikov16-Aug-10 0:33 
AnswerRe: Diff bw BOOL and bool?? Pin
KarstenK16-Aug-10 2:59
mveKarstenK16-Aug-10 2:59 
QuestionMinimize dialog to taskbar Pin
john563214-Aug-10 21:27
john563214-Aug-10 21:27 
AnswerRe: Minimize dialog to taskbar Pin
Garth J Lancaster14-Aug-10 21:37
professionalGarth J Lancaster14-Aug-10 21:37 
GeneralRe: Minimize dialog to taskbar Pin
john563214-Aug-10 21:46
john563214-Aug-10 21:46 
AnswerRe: Minimize dialog to taskbar PinPopular
Richard MacCutchan15-Aug-10 0:58
mveRichard MacCutchan15-Aug-10 0:58 
AnswerRe: Minimize dialog to taskbar [modified] Pin
Eugen Podsypalnikov15-Aug-10 10:12
Eugen Podsypalnikov15-Aug-10 10:12 
GeneralRe: Minimize dialog to taskbar Pin
Richard MacCutchan15-Aug-10 21:31
mveRichard MacCutchan15-Aug-10 21:31 
Questionofstream can't write a "double" value into a file correctly Pin
Joseph Marzbani14-Aug-10 19:19
Joseph Marzbani14-Aug-10 19:19 
AnswerRe: ofstream can't write a "double" value into a file correctly Pin
Garth J Lancaster14-Aug-10 20:07
professionalGarth J Lancaster14-Aug-10 20:07 
GeneralRe: ofstream can't write a "double" value into a file correctly Pin
Joseph Marzbani14-Aug-10 20:49
Joseph Marzbani14-Aug-10 20:49 
GeneralRe: ofstream can't write a "double" value into a file correctly Pin
Garth J Lancaster14-Aug-10 21:19
professionalGarth J Lancaster14-Aug-10 21:19 
GeneralRe: ofstream can't write a "double" value into a file correctly Pin
Joseph Marzbani14-Aug-10 22:34
Joseph Marzbani14-Aug-10 22:34 
AnswerRe: ofstream can't write a "double" value into a file correctly Pin
Aescleal14-Aug-10 22:01
Aescleal14-Aug-10 22:01 
Firstly - of course you can get the size of a structure using sizeof - that's what it's there for. It's only when you make some crass assumptions about what sizeof does that you get into trouble.

Secondly are you sure the code you've presented to us, HTML foobars aside, is the code you've been using? The reason I ask is that a standard conforming compiler won't accept the line:

of.write(reinterpret_cast <char*> (&str.b), sizeof(bool));


as the first parameter to std::basic_stream<char_type>::write is char_type * or wchar_t * for a wofstream. So the first thing I'd do is grab a standard comforming C++ compiler and give your code another go.

Cheers,

Ash
GeneralRe: ofstream can't write a "double" value into a file correctly Pin
Joseph Marzbani14-Aug-10 22:40
Joseph Marzbani14-Aug-10 22:40 

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.