-1
我试图使用这段代码来获取我的应用程序的内存使用情况。不过,我得到以下错误,当我尝试编译:获取应用程序的内存使用情况的错误
error: expected constructor, destructor, or type conversion before '(' token
这里是我的代码:
#include "sys/types.h
#include "sys/sysinfo.h
using namespace std;
struct sysinfo memInfo;
sysinfo (& memInfo);
为什么不在'#include'指令中关闭引号?这可能是你的问题。 – 0x499602D2