帮忙改下错误C:\Users\5.cpp(4) : error C2447: missing function header (old-style formal list?)_百度知道
帮忙改下错误C:\Users\5.cpp(4) : error C2447: missing function header (old-style formal list?)
BubbleSort(data,
for(int i=1,
pData[j-1] = pData[j],5,7,#include<,stdio,7,9,{
int iTemp,
}}void main(){
int data[] = {10,h>,},j>,i++)
cout,int Count),
pData[j] = iTemp,4},8,i<,
for (int i=0,6,7),j--)
if(pData[j]
iTemp = pData[j-1],i++)
for(int j=Count-1,void BubbleSort(int *pData,
提问者采纳
pData[j-1] = pData[j],
for(int i=1,/,Count,void BubbleSort(int *pData,4}, ,/,h>,
C 中不能用 就算能用你也没写完 },6,Count,8,4 5 6 7 8 9 10 Press any key to continue#include<,j>,/,7,
pData[j] = iTemp,这里缺少 <,pData[j-1]
不知道你要升还是降 随便写的
iTemp = pData[j-1],=i,这里分号 错误{
int iTemp,错误很多 自己看/,5,这里的输出语句不对
估计你是想用cout<,/,j--)
if(pData[j]<,stdio,<, {
for(int j=Count-1,int Count)
BubbleSort(data,i<,9,
}}void main(){
int data[] = {10,
for (int i=0,7,这里for循环 缺少 i<,
printf(",%d ",data[i]),pData[j-1])
/,/,i<,7),i++)
提问者评价
谢谢你 我这暑假要学编程要有什么不明白的能找你帮忙吗?
其他类似问题
其他1条回答
,函数名没了 #include,int main()都少了,,
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁急求,关于C语言,error C2447: missing function header (old-style formal list?)_百度知道
急求,关于C语言,error C2447: missing function header (old-style formal list?)
1.cpp#include&stdio.h&#include&C:\Program Files\Microsoft Visual Studio\MyProjects\12\2.cpp&void main(); {char c1,c2,c3,c4,c5;printf(&请输入五个字符\n&);scanf(&%c,%c,%c,%c,%c&,c1,c2,c3,c4,c5);printf(&请再输入一个字符\n&);fflush(stdin);scanf(&%c&,&x);fun(x);if(fun(x)==1)printf(&在五个字符中\n&);elseprintf(&不在五个字符中\n&);}2.cpp#include&stdio.h&int fun(char x){char c1,c2,c3,c4,c5; if(x==c1||x==c2||x==c3||x==c4||x==c5)a=1;elsea=0;}系统提示我error C2447: missing function header (old-style formal list?),到底哪错了?能帮我改正吗
void main();
那应该怎么改
混日子的么,不说了。
其他类似问题
按默认排序
其他3条回答
这个其实很简单int fun(char x){char c1,c2,c3,c4,c5;在子函数当中,你这些倒是定义了,但是没有赋值你要是想实现你的功能,那么c1,c2,c3,c4,c5这些要定义为外部变量
加extern吗
应该是吧,小的很少分开文件写,呵呵
这是练习必须用文件包含,但加了后还是有同样的问题
应该是在主函数那里设置外部变量吧,我忘记了,呵呵你都试试好像还是在主函数的外部声明这些变量吧,你看看书,应该会明白的
1.在1.cpp中用extern int fun(char x)2.在2.cpp中把#include&stdio.h&删掉
应该包含2的头文件吧?
怎么改,已经纠结好久了
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁error C2447: missing function header (old-style formal list?)_百度知道
error C2447: missing function header (old-style formal list?)
MAXREPT)),,%f, else printf(", x0=x1,\,h>,b,{float x1,哪里出错了,,a,math,c,d, printf(", getch(),eps,} float iterate(float x) ,%f",int k=0, scanf(",\,c, %e %f\,n",h>, printf(",{return (3*a*x*x+2*b*x+c),x0,}float df(float x) ,MAXREPT) printf(",h>,x1,double e,n The iteration is failed!\,eps,b,帮忙啊~#include<,,x1),,n", k=%d\,{return(a*x*x*x+b*x*x+c*x+d),c,df(x), } while((e>,&x0, if(k<,a,d,a, #include<,b,n",n", }float f(float x),&eps),k,d,",),k),conio,d,%f,stdio,%f, do {k++,x1, x1=x-f(x)/,=eps)&(k<,k, e=fabs(x1-x0),%f, printf(",the root is x=%f,\,x0),c,), printf(",n", %e %f\,n k xk\,b, return(x1),n please input a,求大神指导, #include<, },%f,), #define MAXREPT 1000 void main() {float x0, x1=iterate(x0),
提问者采纳
float ,d){return(a*x*x*x+b*x*x+c*x+d),iteration ,float ,%f,x0,d,d)/df(x,{return ,float ,float , ,b, ,k=%d\n",printf(",stdio,is ,b,,修改如下加强基础, ,},c) ,x0),#include<,a,x=%f, ,h>,&,\n ,c,d) ,b,b,c, ,MAXREPT)),x0=x1,x,MAXREPT) ,} ,d,float ,float ,float ,a,c, ,,h>,\n ,x,xk\n",b,k),float ,the ,a,x1),%f, , ,df(float ,#define ,&,a,k,c,{float , ,a,MAXREPT ,eps,{k++,x1,c,k=0,scanf(",e,eps,is ,eps),d,&,1000 ,x1=x-f(x,iterate(float , , ,k,(k<,,&,printf(",}float ,a,float ,x1,printf(",iterate(float ,),x1,#include<,%d ,main() ,float , ,float ,int ,a,x0,{float ,&,double , ,float ,input ,=eps)&,x1=iterate(x0,b,while((e>,d) ,b,float ,failed!\n",#include<,,c,}float ,void ,x0,conio,if(k<,root ,&,x, ,a,x, , , ,The ,k ,b,float ,float ,please ,getch(), ,b,%d ,%f\n",a,",float ,float , ,printf(",%f,h>,%f,e=fabs(x1-x0),f(float ,c),else ,printf(",,%f",%f\n",), , ,a,b,c,printf(",d),do ,(3*a*x*x+2*b*x+c),return(x1),\n , ,math,),c,%f,} , ,
请问我最后代入数据(a,b,c,d,x0,eps)为(1/3,0,-1,0,0.1,0.000001)时,为什么输出错误?
1/3你怎么输入的?
明白了,不能直接输入1/3!那我输入1.0/3好像也不对啊~
C的输入不支持任何的运算符号
所以只要输入/就是无法正确获取的所以在本程序中只能近似的输入0. 具体输入多少随你喜欢:)如果想获得更精确的输入 那么可以在输入的时候改成分数输入即输入两个int/float型数据 然后在程序里面去除
提问者评价
其他类似问题
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
C语言常见错误中英文对照表(已经排版好,直接打印)
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口missing function header (old-style formal list?)如何解决_百度知道
missing function header (old-style formal list?)如何解决
我有更好的答案
case 10, fun1(year ),),%d",break,month,int day), case 5,int day) { int i ,标点的,, case 7, ( year%400==0 ) ) sum=sum+29, case 4,,改了一下, case 8,sum),%d",),i<,sum=%d", void fun2(int year, sum=sum+31,&year), scanf(",month,break,调试通过,Input month=",i++) { switch (i) { case 0, void fun1(int year ),sum , sum=sum+30, case 12,day, printf(",day),你可以试下的 呵呵, case 11,, scanf(", void main() { int year,month,, printf(",,), if( (year%4==0 && year%100 != 0) , case 9,break, fun2(year,Input day=", for(i=0,sum=0, printf(",h>,&month),煤每纯椿∈榘伞 #include <, }
这个也是转载来的 很不错哦, sum=sum+day, printf(", else sum=sum+28,break, case 6,%d", } } } void fun1 (int year) { int sum = 0 ,int month,Input year=",stdio,sum, case 2, } void fun2(int year, case 3,int month, scanf(",函数体写法的,&day),你要表达的功能也没写清楚,芏嘤锓ù砦,
我是新手,照书上打的,怎么调试都是出问题,程序哪里错啊
其他类似问题
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁}