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];


目录
相关文章
|
小程序
小程序踩坑:Setting data field "xxxx" to undefined is invalid.
小程序踩坑:Setting data field "xxxx" to undefined is invalid.
289 0
|
算法 C# C++
HALCON error #1201: Wrong type of control parameter: 1 in operator threshold
HALCON error #1201: Wrong type of control parameter: 1 in operator threshold
|
11月前
|
JavaScript
Uncaught runtime errors: × ERROR Avoided redundant navigation to current location: “/xxx“.
Uncaught runtime errors: × ERROR Avoided redundant navigation to current location: “/xxx“.
155 0
|
Ubuntu 开发工具 芯片
安装mkimage工具,解决报错“Invalid CPU Type - valid names are:”
安装mkimage工具,解决报错“Invalid CPU Type - valid names are:”
184 0
安装mkimage工具,解决报错“Invalid CPU Type - valid names are:”
解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
155 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)
161 0
FFmpeg Invalid data found when processing input
FFmpeg Invalid data found when processing input
515 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’?
115 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
466 0