M
Martin Magnusson
Hi,
when compiling the following code with gcc or g++, I get the error
message "test.cpp:6: `noreplace' is not a member of type
`std::basic_ios<char, std::char_traits<char> >'"
Shouldn't this work? Is there another way to check if a file already
exists before creating it?
#include <iostream>
#include <fstream>
int main()
{
std:fstream log_file;
log_file.open( "filename", std::ios::noreplace );
return 0;
}
/ martin
when compiling the following code with gcc or g++, I get the error
message "test.cpp:6: `noreplace' is not a member of type
`std::basic_ios<char, std::char_traits<char> >'"
Shouldn't this work? Is there another way to check if a file already
exists before creating it?
#include <iostream>
#include <fstream>
int main()
{
std:fstream log_file;
log_file.open( "filename", std::ios::noreplace );
return 0;
}
/ martin