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...
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...
由于你的“+-*/”,是一个裸的符号,没有被单引号''给包起来,被C++编译器当成了一个实际的加减乘除的,表达式。纠错很简单,就把对应的加减乘除号,用单引号括起来:if((c==+))修改成:if(c=='+')其他类似的地方相同处理就可以。没有查看你程序的其他问题。
../../include/dos_inc.h:543:78: error: expected primary-expressionbefore‘,’ tokenvoidSetFileName(charconst*const_name) { MEM_BlockWrite(pt+offsetof(sMCB,filename),_name,8); } ...(省略) cpu.cpp: In memberfunction‘voidTaskStateSegment::Get_SSx_ESPx(Bitu, Bitu&, Bitu&)’: cpu....
得看你报这个错的那行代码,才能知道怎么改,单单是这么一个错误信息,只能知道你的那行代码缺基本表达式,但是无法判断出来如何修正。
增加头文件 include <string.h> 错误行改为:strcpy(eq[i],"'c','d','b','=','a','|','e'");