Click here to Skip to main content
15,915,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Emulating Win32 on Windows 98/Me? Pin
Dave Bryant23-Mar-03 13:52
Dave Bryant23-Mar-03 13:52 
GeneralRe: Emulating Win32 on Windows 98/Me? Pin
Ambit23-Mar-03 14:32
Ambit23-Mar-03 14:32 
AnswerRe: Emulating Win32 on Windows 98/Me? Pin
Navin23-Mar-03 16:42
Navin23-Mar-03 16:42 
AnswerRe: Emulating Win32 on Windows 98/Me? Pin
r i s h a b h s23-Mar-03 19:20
r i s h a b h s23-Mar-03 19:20 
GeneralTrying to create context-sensitive help with VC++ Pin
trimtrom23-Mar-03 11:53
trimtrom23-Mar-03 11:53 
GeneralAnnoying fstream problem!! Pin
Rickard Andersson2023-Mar-03 10:29
Rickard Andersson2023-Mar-03 10:29 
GeneralRe: Annoying fstream problem!! Pin
Christian Graus23-Mar-03 10:34
protectorChristian Graus23-Mar-03 10:34 
GeneralRe: Annoying fstream problem!! Pin
Rickard Andersson2023-Mar-03 10:56
Rickard Andersson2023-Mar-03 10:56 
I tried this:

CLogBook dummy;
dummy.open("test.txt", ios_base::in | ios_base::out | ios_base::app);

// This is written to the file
dummy.ErrorCode() = 123;
dummy.ErrorMessage() = "erro error error";
dummy.Extra() = "WinMain";

dummy.SaveLogData();

// 1
dummy.close();
dummy.open("test.txt", ios_base::in | ios_base::out | ios_base::app);

string buf("");
dummy.ReadLogData(buf); // This will success

// 2
// dummy.close();
// dummy.open("test.txt", ios_base::in | ios_base::out | ios_base::app);
	
MessageBox(NULL, buf.c_str(), "", MB_OK);

// This will fail even if I try to close /open in the second place
dummy.ErrorCode() = 666;
dummy.ErrorMessage() = "yadda yadda";
dummy.Extra() = "Linux";


As you can read from the comments, it didn't work... WTF | :WTF:
I must be somewhere else or what have I done wrong.... am I using the fstream wron or what?


Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!

UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!

GeneralRe: Annoying fstream problem!! Pin
Joaquín M López Muñoz23-Mar-03 11:00
Joaquín M López Muñoz23-Mar-03 11:00 
GeneralRe: Annoying fstream problem!! Pin
Rickard Andersson2023-Mar-03 11:12
Rickard Andersson2023-Mar-03 11:12 
GeneralRe: Annoying fstream problem!! Pin
Joaquín M López Muñoz23-Mar-03 20:13
Joaquín M López Muñoz23-Mar-03 20:13 
GeneralRe: Annoying fstream problem!! Pin
Rickard Andersson2023-Mar-03 22:36
Rickard Andersson2023-Mar-03 22:36 
QuestionMenu Mnemonics on Dialog? Pin
MKlucher23-Mar-03 10:05
MKlucher23-Mar-03 10:05 
AnswerRe: Menu Mnemonics on Dialog? Pin
Dave Bryant23-Mar-03 10:46
Dave Bryant23-Mar-03 10:46 
GeneralRe: Menu Mnemonics on Dialog? Pin
MKlucher24-Mar-03 5:36
MKlucher24-Mar-03 5:36 
GeneralDate Sorting Pin
Anthony988723-Mar-03 9:16
Anthony988723-Mar-03 9:16 
GeneralRe: Date Sorting Pin
Ted Ferenc23-Mar-03 12:20
Ted Ferenc23-Mar-03 12:20 
GeneralKeyboard Shortcuts for VC++ 6 Pin
MKlucher23-Mar-03 9:08
MKlucher23-Mar-03 9:08 
GeneralRe: Keyboard Shortcuts for VC++ 6 Pin
jmkhael23-Mar-03 9:11
jmkhael23-Mar-03 9:11 
GeneralHelp concering CDialogBar Pin
Steven M Hunt23-Mar-03 8:51
Steven M Hunt23-Mar-03 8:51 
GeneralRe: Help concering CDialogBar Pin
Rage23-Mar-03 21:06
professionalRage23-Mar-03 21:06 
GeneralRe: Help concering CDialogBar Pin
Steven M Hunt24-Mar-03 6:26
Steven M Hunt24-Mar-03 6:26 
QuestionHow do I completely clear a text file for re-use?? Pin
Anonymous23-Mar-03 7:27
Anonymous23-Mar-03 7:27 
AnswerRe: How do I completely clear a text file for re-use?? Pin
kjessee23-Mar-03 7:47
kjessee23-Mar-03 7:47 
AnswerRe: How do I completely clear a text file for re-use?? Pin
_Theo_23-Mar-03 21:59
_Theo_23-Mar-03 21:59 

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.