0
我在一個非常簡單的頭文件中收到C2143錯誤。你能幫我找到問題嗎?錯誤C2143 VC++ 12
#ifndef GLOB_H_INCLUDED
#define GLOB_H_INCLUDED
#include <string>
#include <windows.h>
extern string *name, *surname, *dob, *hospNo, *addr, *sex, *email, *phone, *nhs, *allerg, *indic, *notes;
extern int leftc, rightc, middlec;
extern string ks;
#endif
如果您需要進一步解釋任何事情......提前致謝。
向另一個頭添加'using'語句並不好 - 它強制整個名稱空間進入任何包含該頭的代碼的範圍。 – 2013-03-13 11:36:17
@roger_rowland我完全同意你的觀點,我的意圖是提供問題的快速解決方案,而不會對C++最着名的方法潛心鑽研:-) – 2013-03-13 11:41:54