VC6:missing ‘;‘ before ‘type‘

简介: VC6:missing ‘;‘ before ‘type‘
double stu[5] = {1.1, 2.2, 3.3, 4.4, 5.5}, sum;
stu[0] = 88.5;
sum = stu[2] + stu[4];
int i;
上面代码会报错是由于部分变量声明位于执行代码前面
改进方法:将全部变量声明放置再执行代码前面即可(下方)
double stu[5] = {1.1, 2.2, 3.3, 4.4, 5.5}, sum;
int i;
stu[0] = 88.5;
sum = stu[2] + stu[4];


目录
相关文章
|
11月前
|
Ubuntu C语言
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
106 0
GLib-CRITICAL : g_variant_get_uint32: assertion ‘g_variant_is_of_type (value, G_VARIANT_TYPE_UINT32)
GLib-CRITICAL : g_variant_get_uint32: assertion ‘g_variant_is_of_type (value, G_VARIANT_TYPE_UINT32)
118 0
tdav_converter_video.cxx:49:9: error: ‘uint8’ does not name a type; did you mean ‘uint’?
tdav_converter_video.cxx:49:9: error: ‘uint8’ does not name a type; did you mean ‘uint’?
97 0
|
计算机视觉
opencv出错:error: (-213:The function/feature is not implemented) Unknown/unsupported array type
opencv出错:error: (-213:The function/feature is not implemented) Unknown/unsupported array type
406 0
|
iOS开发
Xcode报错:Failed to find a suitable device for the type SimDeviceType解决方法
Xcode报错:Failed to find a suitable device for the type SimDeviceType解决方法
186 0
SAP WM 为Storage Type 004激活SUM报错 - Storage types without pick-point stor.type require partial pallet
SAP WM 为Storage Type 004激活SUM报错 - Storage types without pick-point stor.type require partial pallet
SAP WM 为Storage Type 004激活SUM报错 - Storage types without pick-point stor.type require partial pallet
How to add extension field to report
How to add extension field to report
108 0
错误信息Make an entry in Field Text Area
新建sales order时,如果未维护notes,则无法save sales order,遇到如下error message:
102 0
错误信息Make an entry in Field Text Area
|
前端开发 iOS开发 移动开发
Xcode 10: Build input file double-conversion cannot be found
升级到xcode10之后 ReactNative项目启动报错如下: error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.
3232 0