[英]excess elements in aggregate initializer
static const double convTable[4][4] =
{
{1.0, 1000.0, 1000000.0, 1000000000,0 },
{0.001, 1.0, 1000.0, 1000000,0 },
{0.000001, 0.001, 1.0, 1000.0 },
{0.000000001, 0.000001, 0.001, 1,0 }
};
I have this array, in a header file, but it won't compile, Not sure why? 我在头文件中有此数组,但无法编译,不知道为什么吗?
You are using commas instead of points in some of the items, so you have more than 4 items per row. 您在某些项目中使用逗号而不是点,因此每行有四个以上项目。
{1.0, 1000.0, 1000000.0, 1000000000,0 }
^
should be 应该
{1.0, 1000.0, 1000000.0, 1000000000.0 }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.