-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