Click here to Skip to main content
15,923,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: STL string calling delete and crashing... [modified] Pin
Mark Salsbery25-May-07 5:33
Mark Salsbery25-May-07 5:33 
AnswerRe: STL string calling delete and crashing... Pin
_AnsHUMAN_ 25-May-07 2:08
_AnsHUMAN_ 25-May-07 2:08 
AnswerRe: STL string calling delete and crashing... Pin
Michael Dunn25-May-07 21:33
sitebuilderMichael Dunn25-May-07 21:33 
Questionofstream flags - create file... Pin
ldsdbomber25-May-07 1:20
ldsdbomber25-May-07 1:20 
AnswerRe: ofstream flags - create file... Pin
Arman S.25-May-07 2:09
Arman S.25-May-07 2:09 
GeneralRe: ofstream flags - create file... Pin
ldsdbomber25-May-07 2:14
ldsdbomber25-May-07 2:14 
GeneralRe: ofstream flags - create file... Pin
Arman S.25-May-07 2:57
Arman S.25-May-07 2:57 
GeneralRe: ofstream flags - create file... [modified] Pin
ldsdbomber25-May-07 3:02
ldsdbomber25-May-07 3:02 
Hi Arman, well I must be misunderstanding it then because this is my code. When i step through it
"fileName" is to a valid path, because if I make the file exist, the code drops into the file exists section. If I delete the file and rerun it, it drops into the file does not exist section and it can't have been created because nothing is being written to it. Also, if the default action of ".open" is to create it if not found, where is the empty file, and why is it even going into the "file does not exist" section of the if/else??

fstream FileDataStream;
FileDataStream.open(fileName);
if(FileDataStream.is_open())
{
// file exists
// Read Data
// Append Data
}
else
{
// file does not exist
// WriteHeader
FileDataStream<<'!'<
QuestionRe: ofstream flags - create file... Pin
David Crow25-May-07 3:40
David Crow25-May-07 3:40 
AnswerRe: ofstream flags - create file... Pin
ldsdbomber25-May-07 3:51
ldsdbomber25-May-07 3:51 
GeneralRe: ofstream flags - create file... Pin
David Crow25-May-07 3:56
David Crow25-May-07 3:56 
GeneralRe: ofstream flags - create file... Pin
ldsdbomber25-May-07 4:05
ldsdbomber25-May-07 4:05 
QuestionDialogs at design time Pin
mcsherry25-May-07 1:19
mcsherry25-May-07 1:19 
AnswerRe: Dialogs at design time Pin
Maximilien25-May-07 1:41
Maximilien25-May-07 1:41 
AnswerRe: Dialogs at design time Pin
Hamid_RT25-May-07 1:49
Hamid_RT25-May-07 1:49 
AnswerRe: Dialogs at design time Pin
toxcct25-May-07 3:10
toxcct25-May-07 3:10 
AnswerRe: Dialogs at design time Pin
David Crow25-May-07 3:17
David Crow25-May-07 3:17 
Questionpreview file while protecting Pin
anu jaggi25-May-07 1:01
anu jaggi25-May-07 1:01 
AnswerRe: preview file while protecting Pin
Cedric Moonen25-May-07 1:03
Cedric Moonen25-May-07 1:03 
GeneralRe: preview file while protecting Pin
Nelek25-May-07 1:13
protectorNelek25-May-07 1:13 
GeneralRe: preview file while protecting Pin
David Crow25-May-07 3:18
David Crow25-May-07 3:18 
QuestionRe: preview file while protecting Pin
Hamid_RT25-May-07 5:58
Hamid_RT25-May-07 5:58 
GeneralRe: preview file while protecting Pin
Mark Salsbery25-May-07 5:46
Mark Salsbery25-May-07 5:46 
AnswerRe: preview file while protecting Pin
Hamid_RT25-May-07 1:38
Hamid_RT25-May-07 1:38 
QuestionHow to get ID of standard Common DialogBox? Pin
Atul2325-May-07 0:46
Atul2325-May-07 0:46 

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.