Click here to Skip to main content
16,017,857 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Syntax Pin
David Crow31-May-07 3:36
David Crow31-May-07 3:36 
GeneralRe: Syntax Pin
toxcct31-May-07 3:38
toxcct31-May-07 3:38 
GeneralRe: Syntax Pin
Roger Stoltz31-May-07 3:40
Roger Stoltz31-May-07 3:40 
GeneralRe: Syntax Pin
John R. Shaw31-May-07 9:02
John R. Shaw31-May-07 9:02 
GeneralRe: Syntax Pin
Matthew Faithfull31-May-07 3:55
Matthew Faithfull31-May-07 3:55 
Questionpls help me-msi file Pin
saisp31-May-07 2:27
saisp31-May-07 2:27 
AnswerRe: pls help me-msi file Pin
Hamid_RT31-May-07 2:44
Hamid_RT31-May-07 2:44 
QuestionI can't believe I am having so many problems with file access Pin
ldsdbomber31-May-07 2:26
ldsdbomber31-May-07 2:26 
I must be some kind of melon head. I'm including <fstream> and don't understand why I can construct an fstream like so

fstream FileDataStream;
FileDataStream.open(fileName, ios::out | ios::ate);

and get things to work

but not

fstream FileDataStream;
FileDataStream.open(fileName, ios::out | ios::noreplace);

because it says
error C2039: 'noreplace' : is not a member of 'basic_ios<char,struct std::char_traits<char=""> >'


I've only looked in the help and checked out "fstream", read the notes about its ctor and seen these flags, I could understand if the 1st one didn't work, I would assume I'm doing something ridiculous, but can't work out how it can recognise some of the mode flags, but not another



If any kind soul can just get me going (I know it tends to be David Crow who comes to the rescue!) I would really appreciate it.


I just want to:


- check if a file (specified by a CString object) exists.

- if it does, I want to nip to the end of the file and start appending data rows

- if it doesn't, I just need to create it, bung in a few lines of header and then put the data rows in it.


I'm embarrassed and ashamed that it's taking me so long to get this to work as I'm sure in days gone by I must have done this a hundred times!

aaarrrggghhhhh!
AnswerRe: I can't believe I am having so many problems with file access Pin
ldsdbomber31-May-07 2:28
ldsdbomber31-May-07 2:28 
AnswerRe: I can't believe I am having so many problems with file access Pin
toxcct31-May-07 2:40
toxcct31-May-07 2:40 
AnswerRe: I can't believe I am having so many problems with file access Pin
David Crow31-May-07 4:02
David Crow31-May-07 4:02 
GeneralRe: I can't believe I am having so many problems with file access Pin
ldsdbomber31-May-07 6:01
ldsdbomber31-May-07 6:01 
GeneralRe: I can't believe I am having so many problems with file access Pin
David Crow31-May-07 6:10
David Crow31-May-07 6:10 
Questionpls help me-msi file Pin
saisp31-May-07 2:25
saisp31-May-07 2:25 
AnswerRe: pls help me-msi file Pin
toxcct31-May-07 2:37
toxcct31-May-07 2:37 
AnswerRe: pls help me-msi file Pin
Hamid_RT31-May-07 2:45
Hamid_RT31-May-07 2:45 
JokeRe: IDE Pin
CPallini31-May-07 2:10
mveCPallini31-May-07 2:10 
GeneralRe: IDE Pin
Hamid_RT31-May-07 2:47
Hamid_RT31-May-07 2:47 
GeneralRe: IDE Pin
Rajesh R Subramanian31-May-07 3:10
professionalRajesh R Subramanian31-May-07 3:10 
GeneralRe: IDE Pin
toxcct31-May-07 3:23
toxcct31-May-07 3:23 
QuestionIDE Pin
tom groezer31-May-07 2:07
tom groezer31-May-07 2:07 
AnswerRe: IDE Pin
toxcct31-May-07 2:14
toxcct31-May-07 2:14 
GeneralRe: IDE Pin
tom groezer31-May-07 2:31
tom groezer31-May-07 2:31 
GeneralRe: IDE Pin
toxcct31-May-07 2:34
toxcct31-May-07 2:34 
AnswerRe: IDE Pin
jhwurmbach31-May-07 2:42
jhwurmbach31-May-07 2:42 

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.