有关于才c++的,遇到这样的问题怎么改?

来源:百度知道 编辑:UC知道 时间:2024/05/25 11:44:12
--------------------Configuration: 实验2 - Win32 Debug--------------------
Compiling...
综合.cpp
F:\c++\综合.cpp(29) : error C2228: left of '.num' must have class/struct/union type
F:\c++\综合.cpp(29) : error C2228: left of '.name' must have class/struct/union type
F:\c++\综合.cpp(31) : error C2228: left of '.score' must have class/struct/union type
F:\c++\综合.cpp(35) : error C2601: 'ave' : local function definitions are illegal
F:\c++\综合.cpp(48) : error C2601: 'maxmin' : local function definitions are illegal
F:\c++\综合.cpp(69) : error C2601: 'main' : local function definitions are illegal
F:\c++\综合.cpp(95) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.

综合.obj - 1 error(s), 0 warning(s)
我是绝对的菜鸟。帮帮。。。

前三个你要检查一下student1.num这个student1是不是你定义的struct类型(或者class)
中间三个是说你函数定义有问题
最后一个应该是你某些地方少}或者;吧

这不看具体代码也不好说问题到底出在哪儿

定义class/struct/union出错了

把程序写出来就可以直接改了