D
Dennis
if you have the headers and main in below code snippet, the below ios::noreplace
creates an error:
error C2039: 'noreplace' : is not a member of 'basic_ios<char,struct
std::char_traits<char> >'
error C2065: 'noreplace' : undeclared identifier
The ios::noreplace allows the open to fail if the file already exists. What
does the new std library use to fail an open if the file already exists?
I need to use the std <fstream> rather than the older <fstream.h> because the
older version will not let me print a string with the statement
fdebug<<sMyString<<endl; where sMyString is defined in string sMyString;
Thanks for any help.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
......
fstream fdebug("c:\\temp\\fdebug.txt", ios::noreplace);
.....
}
creates an error:
error C2039: 'noreplace' : is not a member of 'basic_ios<char,struct
std::char_traits<char> >'
error C2065: 'noreplace' : undeclared identifier
The ios::noreplace allows the open to fail if the file already exists. What
does the new std library use to fail an open if the file already exists?
I need to use the std <fstream> rather than the older <fstream.h> because the
older version will not let me print a string with the statement
fdebug<<sMyString<<endl; where sMyString is defined in string sMyString;
Thanks for any help.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
......
fstream fdebug("c:\\temp\\fdebug.txt", ios::noreplace);
.....
}