把typedef去掉!struct stu{int length;int width;int height;char name[9];}student[10][10];int main(){ 后面的 maxnum=student[i][0];minnum=student[i][0]; 这两句没有看懂,两个不同的类型数据,怎么能赋值?
Alternatively, you could use sizeof on an expression, and you won't need the parenthesis. This would be preferable, because if you choose to change the type of stud then you won't need to replace an extra typename when you do so: struct student *stud = malloc(10 * sizeof *stud); ...
This is the beginning of my code. I am rebuilding as I go along. I am stuck getting the error "error expected primary-expression before ')' token". This error occurs down at lines 45-48, when I am attempting to call the functions. I don't want to get to far and then have more...
As Grey Wolf mentioned "The else clause should not have an expression associated with it." Here is the correct version of your code. (Look atelse) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ...
int print(struct student) 改为 int print(struct student stu),然后 student.num 改为 stu.num,其余类似修改。. 前面应该是结构变量名,而不是结构类型名。
|39|error: expected primary-expression before '<=' token| |39|error: expected ';' before ')' token| |41|error: 'maxnum' was not declared in this scope| |45|error: redeclaration of 'int num1'| |20|error: 'int num1' previously declared here| ...
int print(struct student) 改为 int print(struct student stu),然后 student.num 改为 stu.num,其余类似修改。. 前面应该是结构变量名,而不是结构类型名。
a尽她最大努力 She greatly diligently[translate] a[Error] C:\Users\DELL\Documents\C-Free\Temp\未命名9.cpp:20: error: expected primary-expression before "else" (错误) C:\Users\DELL\Documents\C -释放\临时雇员\未命名9.cpp :20 : 错误: 期望的主要表示在“之前”[translate]...
I am a beginner student learning functions. I had an assignment to complete regarding functions and have an error that appears on line 25 stating "expected primary-expression before "int"". When I try to run my program through g++ the program is not displaying the displayMessages. Any input...
expected primary-expression before '.' token是指缺少申明,需要申明变量。解决方法:LOG(INFO)的头函数为:logging,新建文件my_dbclient.h my_dbclient.cpp 作为自定义的接口,具体实现如下:my_dbclient.h [cpp] view plain copy #include <iostream> include <vector> include //注意:这里并...