- 论坛徽章:
- 0
|
在UNIX中用C++标准库??不会,向高手请教
55555~~z我知道 这是在vc中的标准写法,但好像在Unix中用不了啊~~
刚才试了一下 ,还是通不过。
源码如下
#include <iostream.h>;
#incldue <string.h>;
using namespace std;
int main()
{
String cc="hello world,stl";
cout<<cc<<endl;
return 1;
}
编译结果为:
*****************************************
ultra65:test%make
CC -g -I//export/home/test/noDel/include/cplus -I//export/home/test/noDel/inclc
"strtest.cc", line 2: Error: Unknown preprocessor directive.
"strtest.cc", line 4: Error: Type name expected instead of "using".
"strtest.cc", line 8: Error: String is not defined.
"strtest.cc", line 8: Error: cc is not defined.
"strtest.cc", line 8: Error: Badly formed expression.
"strtest.cc", line 10: Error: cc is not defined.
6 Error(s) detected.
*** Error code 6
make: Fatal error: Command failed for target `strtest.o' |
|