[問題] 全域變數宣告在哪?
請問一下 環境是 VS C++/CLR
因為我有兩個form 兩個form要共用幾個變數
不過全域變數卻不知道要宣告在哪??= =
我的form1.h大致上如下
#include <..>
using namespace ....
namespace proj{ //此form1的namespace
public ref class xxx : public System::Windows::Forms::Form
{
public:
xxx(void){} // constructor
protect:
~xxx(){} //deconstrutor
private:private: System::Windows::Forms::Button^ btn_xxxx;
.....//一些變數member
}
}
大致上降
我想宣告一個全域變數如下
String^ sss;
但無奈宣告在哪都錯...
手上沒有書
煩請高手指點一下
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.133.98
→
05/09 23:15, , 1F
05/09 23:15, 1F
→
05/09 23:20, , 2F
05/09 23:20, 2F
→
05/09 23:21, , 3F
05/09 23:21, 3F
→
05/09 23:32, , 4F
05/09 23:32, 4F
→
05/09 23:46, , 5F
05/09 23:46, 5F
→
05/09 23:46, , 6F
05/09 23:46, 6F
→
05/10 01:12, , 7F
05/10 01:12, 7F
推
05/11 01:19, , 8F
05/11 01:19, 8F
討論串 (同標題文章)
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章