写了这样一个类:
class Base{
private:
int r[MAX_SIZE];
int length;
public:
Base()
{
r[MAX_SIZE] = {1,2,0,5,8,9,7,3,6,4}; //编译的时候在这边出错
length = 10;
}
void swap_data(int,int);
void Show(const Base &ob);
friend int Bubble_Sort0(Base &ob);
};
出错原因是:
1.cpp: In constructor ‘Base::Base()’:
1.cpp:13: 警告:extended initializer lists 只在 -std=c++0x 或 -std=gnu++0x 下可用
1.cpp:13: 错误:不能将‘’转换为‘int’,在 assignment 中
请问各位大神,这是什么意思?有什么解决办法?