static const int jm_x0 =85;
static const double q_y0= 150;//渠画图原点
};
报错为
'q_y0' : only const static integral data members can be initialized inside a class or struct
为什么
...全文
1129打赏收藏
给类以double成员变量,出错.
程序是 #pragma once class jm { public: jm(void); ~jm(void); private: public: static const int jm_x0 =85; static const double q_y0= 150;//渠画图原点 }; 报错为 'q_y0' : only const static integral data members can be initialized inside a class or struct 为什么