为什么auto关键字报这个错误呢
#include "test.h"
#include <iostream>
using namespace std;
int main(){
double dval = 3.14;
//double fval = 2.0;
//double &dval2 = dval;
//const double &dval3 = dval;
//double const *dval4 = &dval;
//int const i = 1;
auto x = dval;
}
3 个解决方案
#1
参数里加上 -std=c++11再试试
#2
+2
#1
参数里加上 -std=c++11再试试
#2
参数里加上 -std=c++11再试试
+2