開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Linux GCC
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
NO
問題(Question):
#include <cstdlib>
#include <iostream>
using namespace std;
int VDR = 3000;
void SetVR()
{
VDR =VDR -100;
APP->dec(5,4);
}
class APP
{
public:
void dec(int x, int y);
};
void dec(int x,int y)
{
int d = x-y;
cout << d << endl;
}
int main()
{
SetVR();
cout << VDR <<endl;
system("pause");
return 0;
}
預期的正確結果(Expected Output):
2900
1
錯誤結果(Wrong Output):
APP was not declared in this scope
不曉得如何處理?
我已經是使用public為何外部抓不到