Linux下c++编程问题
1.在vc++下
#define ASSERT(e) if(!(e)){ throw "ERROR"; }
编译没有问题,但在linux,gcc编译,却在 换行继续符 '\'
给出 "stray '\' in program"的出错信息,why?
怎样解决?
2.linux下gcc编译:
#include <iostream>
using namespace std;
void main()
{
cout<<"dsf"<<endl;
}
包含头文件<iostream>没有错,
但gcc却说cout,(ostream&)<<(const char*)
undefined reference cout..
是gcc没有找到lib文件,还是什么问题?