在C++中,std::vector sensorReadings = {1.2, 3.4, 5.6};是一种合法的初始化向量(动态数组)的方式。
std::vector<double> sensorReadings = {1.2, 3.4, 5.6};
正确
错误