单选题 有如下类定义: class Sample{ public; Sample(int x):ref(x){} //① private:Sample():ref(0){} //② static int val=5; //③ const int ref; //④};上述程序段中,错误的语句是( )。
【正确答案】 C
【答案解析】解析:静态整型数据不能定义为类的数据成员。