line 15: expected ';' before "char" line 23: expected primary-expression before "continue" line 23: expected ')' before "continue" line 23: expected ';' before '==' token line 23: expected primary-expression before "continue" (yes, it gave this one twice) ...
23 C:\Dev-Cpp\Templates\Date2.0.cpp expected primary-expression before "char" 23 C:\Dev-Cpp\Templates\Date2.0.cpp expected `;' before "char" Part of my code // This program demonstrates the Date class. #include <iostream> #include <cctype> ...
得看你报这个错的那行代码,才能知道怎么改,单单是这么一个错误信息,只能知道你的那行代码缺基本表达式,但是无法判断出来如何修正。
1)case '@': ClearStack(S); break; 清空栈后,想再不初始化就再使用?top指针其实编程空指针了。2)什么情况下用变量的使用问题,typedef struct{。。。}SqStack,*S;中的*S,InitStack(S);把S当做全局指针?基础要加强。3)代码修正如下,可以正确运行。include<stdlib.h> include<stdio.h> ...
struct student { int num;char name[30]; //人名不可能是单字符!char sex[5]; //性别,你后面用的%s读、写,就要定义成字符串 float math;float english;float politics;};
In file included from Main.cpp:4: CPPString.cpp: In constructor ‘CPPString::CPPString(unsigned char*)’: CPPString.cpp:6: error: expected primary-expression before ‘unsigned’ make: *** [main] Error 1 The compiler finds the error at what is pictured above as line 3. ...
由于你的“+-*/”,是一个裸的符号,没有被单引号''给包起来,被C++编译器当成了一个实际的加减乘除的,表达式。纠错很简单,就把对应的加减乘除号,用单引号括起来:if((c==+))修改成:if(c=='+')其他类似的地方相同处理就可以。没有查看你程序的其他问题。
增加头文件 include <string.h> 错误行改为:strcpy(eq[i],"'c','d','b','=','a','|','e'");
structstudent{intnum;charname[30];//人名不可能是单字符!charsex[5];//性别,你后面用的%s读、写,就要定义成字符串floatmath;floatenglish;floatpolitics;};
'},{'-','-','-','-'}};char letters[]={'A','B'};char M[100];for(int i=0;number[count_L-1];i++)M[i]=code[i];void loop_p();} void loop_p(){ int i=0;int a=0;if(M[i]==w[a][i])i++;else {a++;loop_p();} printf("%c",letters[a]);} ...