18 C:\Dev-Cpp\Templates\Date2.0.cpp expected primary-expression before "char" 18 C:\Dev-Cpp\Templates\Date2.0.cpp expected `;' before "char" 23 C:\Dev-Cpp\Templates\Date2.0.cpp expected primary-expression before "char" 23 C:\Dev-Cpp\Templates\Date2.0.cpp expected `;' before "char"...
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> ...
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) ...
Expected primary expression before Ask Question Asked11 years, 4 months ago Modified11 years, 4 months ago Viewed4k times 0 I have the following code in a translator.h file classDictionary{public:Dictionary(constchardictFileName[]);voidtranslate(charout_s[],constchars[]); ...
typedef char Status;typedef char SElemType;define STACK_INIT_SIZE 100 define STACKINCREMENT 10 typedef struct{ SElemType *base;SElemType *top;int stacksize;}SqStack;SqStack S;Status InitStack(){ S.base = (SElemType * )malloc(STACK_INIT_SIZE * sizeof(SElemType));if(!S.base)ex...
由于你的“+-*/”,是一个裸的符号,没有被单引号''给包起来,被C++编译器当成了一个实际的加减乘除的,表达式。纠错很简单,就把对应的加减乘除号,用单引号括起来:if((c==+))修改成:if(c=='+')其他类似的地方相同处理就可以。没有查看你程序的其他问题。
../../include/dos_inc.h: In memberfunction‘voidDOS_MCB::SetFileName(constchar*)’: ../../include/dos_inc.h:543:78: error: expected primary-expressionbefore‘,’ tokenvoidSetFileName(charconst*const_name) { MEM_BlockWrite(pt+offsetof(sMCB,filename),_name,8); } ...
struct C { template< typename T > static bool big() { return sizeof( T ) > 8; } }; template< typename X > struct UseBig { static bool test() { return X::big< char >(); // ERROR: expected primary-expression } // before 'char' }; int main() { C::big< char...
增加头文件 include <string.h> 错误行改为:strcpy(eq[i],"'c','d','b','=','a','|','e'");
struct student { int num;char name[30]; //人名不可能是单字符!char sex[5]; //性别,你后面用的%s读、写,就要定义成字符串 float math;float english;float politics;};