scanf输入时要求用指针,所以scanf ("%d,%d,%d",a,b,c);要改成scanf ("%d,%d,%d",&a,&b,&c);不要把中文标点符号与西文的混淆 所以printf ("%d,%d,%d",b,a,c);要改成printf ("%d,%d,%d",b,a,c);
int m,int h)后面就是少了个分号。所以编译器告诉你“missing';'before identifier'printf'”,这有...
include"stdio.h"void main() {int i=1,n;long s=1; printf("please input n:"); //末尾加分号 scanf("%d",&n); do { s=s*i;i++; } while ( i<=8 ); printf("%d!=%ld\n",n,s);}
错误C2146:语法错误:缺少“;”标识符“scanf的前” 翻译结果2复制译文编辑译文朗读译文返回顶部 错误C2146: 语法错误: 缺少前标识符 '浮点型'; 翻译结果3复制译文编辑译文朗读译文返回顶部 错误C2146: 语法错误: 缺少前标识符 '浮点型'; 翻译结果4复制译文编辑译文朗读译文返回顶部 ...
error C2146: syntax error : missing ',' before identifier 's'The code line is given below:===CODE===#include <comdef.h> #include <string> #include <sstream>class tstring : public std::basic_string<TCHAR> { public: typedef std::basic_string<TCHAR> base_class;// Constructors expl...
scanf("%d",&x)//注意取地址 else(x>=10)y=3*x-11;//else不能加判断条件 应该为else if
error C2146: syntax error : missing ',' before identifier 's'The code line is given below:===CODE===#include <comdef.h> #include <string> #include <sstream>class tstring : public std::basic_string<TCHAR> { public: typedef std::basic_string<TCHAR> base_class;// Constructors exp...
scanf("%s",stu[i].stu_id);printf("输入第%d个学生的数学成绩:",i+1);scanf("%f",&stu[i].score[0]);printf("输入第%d个学生的英语成绩:",i+1);scanf("%f",&stu[i].score[1]);printf("输入第%d个学生的计算机成绩:",i+1);scanf("%f",&stu[i].score[2]);stu[i].total...
I am creating a C program using C++ ,it gives me error of scanf.Use scan_f instead.Y is it so. Toggle button in mfc Turn off /D UNICODE and /D _UNICODE in Visual Studio 2008 Professional Two DLL has the functions have the same name. Which dll program will choose? Unable to add ...
这一句提示语的意思是说:在printf前面大概丢掉了分号(;)。c语言中的出错提示语都说的是大概。找错误时在printf前后检查有没有语法错误,而不仅仅检查是不是丢掉分号。在你发来的程序段中,printf语句前后没有发现语法错误。我判断错误是不是出现在chenge() 函数中,你没有把chenge函数的内容发来,...