s*****n 发帖数: 1279 | 1 以前用C++都是在interpreter的环境下,现在想编译,发现好多都不懂。大家帮我看看下
面这个程序:
#include
#include
#include
#include
#include
int main (int argc, char **argv)
{
int iarg = 1;
char root_file_name[256];
strcpy (single_file_name,argv[1]);
strcpy (root_file_name, argv[2]);
ofstream decayresults(root_file_name);
decayresults.close();
cout<<"That's all"<
}//end of main
然后我用下面的Makefile编译总是通不过,说是ofstream,cout, endl 都没有定义。难
道不是只要include , | N*********y 发帖数: 105 | 2 Don't play with him. Give him an answer.
put "using namespace std;" after includes. |
|