不知道少了什么???
#include "stdafx.h"
#include "fstream.h"// this file have included iostream.h already
#include "ios.h"//for ios_base::out etc
int main(int argc, char* argv[])
{
ofstream f2("file2.out",ios_base::out);
return 0;
}
Compiling...
file.cpp
E:\file\file.cpp(14) : error C2653: 'ios_base' : is not a class or namespace name
E:\file\file.cpp(14) : error C2065: 'out' : undeclared identifier
Error executing cl.exe.
Creating browse info file...