当前位置: 技术问答>linux和unix
G++ 和 GCC 的问题
来源: 互联网 发布时间:2016-05-26
本文导语: #include "xxxx.h" int main(int argc, char *argv[]) { memset(xxxx,xxx,xx); return 1; } 我用GCC编译通过 改成G++就提示 头文件我已经加了 要不GCC也过不了 ‘memset’ was not declared in this scope 这是什么问题呢?? |...
#include "xxxx.h"
int main(int argc, char *argv[])
{
memset(xxxx,xxx,xx);
return 1;
}
我用GCC编译通过 改成G++就提示 头文件我已经加了 要不GCC也过不了
‘memset’ was not declared in this scope
这是什么问题呢??
int main(int argc, char *argv[])
{
memset(xxxx,xxx,xx);
return 1;
}
我用GCC编译通过 改成G++就提示 头文件我已经加了 要不GCC也过不了
‘memset’ was not declared in this scope
这是什么问题呢??
|
少了
gcc 默认调用的是 C 编译器
g++ 默认调用的是 C++ 编译器
c++ 的语法会严格一些
#include
gcc 默认调用的是 C 编译器
g++ 默认调用的是 C++ 编译器
c++ 的语法会严格一些