这个warning :编译器选项里面改一下 代码生成里面的语言标准,改为GNU c++ 11error: A.data[maxsize] = {2,5,7}; 这个是往 data[100] 里面存储,不是你想的那样初始化的。