missing function header (old-stylebusiness formall list?)

帮忙改下错误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&lt,stdio,7,9,{
int iTemp,
}}void main(){
int data[] = {10,h&gt,},j&gt,i++)
cout,int Count),
pData[j] = iTemp,4},8,i&lt,
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,&#47,Count,void BubbleSort(int *pData,4}, ,&#47,h&gt,
C 中不能用 就算能用你也没写完 },6,Count,8,4 5 6 7 8 9 10 Press any key to continue#include&lt,j&gt,&#47,7,
pData[j] = iTemp,这里缺少 &lt,pData[j-1]
不知道你要升还是降 随便写的
iTemp = pData[j-1],=i,这里分号 错误{
int iTemp,错误很多 自己看&#47,5,这里的输出语句不对
估计你是想用cout&lt,&#47,j--)
if(pData[j]&lt,stdio,&lt, {
for(int j=Count-1,int Count)
BubbleSort(data,i&lt,9,
}}void main(){
int data[] = {10,
for (int i=0,7,这里for循环 缺少 i&lt,
printf(&quot,%d &quot,data[i]),pData[j-1])
&#47,&#47,i&lt,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(&quot, x0=x1,&#92,h&gt,b,{float x1,哪里出错了,,a,math,c,d, printf(&quot, getch(),eps,} float iterate(float x) ,%f&quot,int k=0, scanf(&quot,&#92,c, %e %f&#92,n&quot,h&gt, printf(&quot,{return (3*a*x*x+2*b*x+c),x0,}float df(float x) ,MAXREPT) printf(&quot,h&gt,x1,double e,n The iteration is failed!&#92,eps,b,帮忙啊~#include&lt,,x1),,n&quot, k=%d&#92,{return(a*x*x*x+b*x*x+c*x+d),c,df(x), } while((e&gt,&x0, if(k&lt,a,d,a, #include&lt,b,n&quot,n&quot, }float f(float x),&eps),k,d,&quot,),k),conio,d,%f,stdio,%f, do {k++,x1, x1=x-f(x)&#47,=eps)&(k&lt,k, e=fabs(x1-x0),%f, printf(&quot,the root is x=%f,&#92,x0),c,), printf(&quot,n&quot, %e %f&#92,n k xk&#92,b, return(x1),n please input a,求大神指导, #include&lt, },%f,), #define MAXREPT 1000 void main() {float x0, x1=iterate(x0),
提问者采纳
float&nbsp,d){return(a*x*x*x+b*x*x+c*x+d),iteration&nbsp,float&nbsp,%f,x0,d,d)/df(x,{return&nbsp,float&nbsp,float&nbsp,&nbsp,b,&nbsp,k=%d\n&quot,printf(&quot,stdio,is&nbsp,b,,修改如下加强基础,&nbsp,},c)&nbsp,x0),#include&lt,a,x=%f,&nbsp,h&gt,&amp,\n&nbsp,c,d)&nbsp,b,b,c,&nbsp,MAXREPT)),x0=x1,x,MAXREPT)&nbsp,}&nbsp,d,float&nbsp,float&nbsp,float&nbsp,a,c,&nbsp,,h&gt,\n&nbsp,x,xk\n&quot,b,k),float&nbsp,the&nbsp,a,x1),%f,&nbsp,&nbsp,df(float&nbsp,#define&nbsp,&amp,a,k,c,{float&nbsp,&nbsp,a,MAXREPT&nbsp,eps,{k++,x1,c,k=0,scanf(&quot,e,eps,is&nbsp,eps),d,&amp,1000&nbsp,x1=x-f(x,iterate(float&nbsp,&nbsp,&nbsp,k,(k&lt,,&amp,printf(&quot,}float&nbsp,a,float&nbsp,x1,printf(&quot,iterate(float&nbsp,),x1,#include&lt,%d&nbsp,main()&nbsp,float&nbsp,&nbsp,float&nbsp,int&nbsp,a,x0,{float&nbsp,&amp,double&nbsp,&nbsp,float&nbsp,input&nbsp,=eps)&amp,x1=iterate(x0,b,while((e&gt,d)&nbsp,b,float&nbsp,failed!\n&quot,#include&lt,,c,}float&nbsp,void&nbsp,x0,conio,if(k&lt,root&nbsp,&amp,x,&nbsp,a,x,&nbsp,&nbsp,&nbsp,The&nbsp,k&nbsp,b,float&nbsp,float&nbsp,please&nbsp,getch(),&nbsp,b,%d&nbsp,%f\n&quot,a,&quot,float&nbsp,float&nbsp,&nbsp,printf(&quot,%f,h&gt,%f,e=fabs(x1-x0),f(float&nbsp,c),else&nbsp,printf(&quot,,%f&quot,%f\n&quot,),&nbsp,&nbsp,a,b,c,printf(&quot,d),do&nbsp,(3*a*x*x+2*b*x+c),return(x1),\n&nbsp,&nbsp,math,),c,%f,}&nbsp,&nbsp,
请问我最后代入数据(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&quot,break,month,int day), case 5,int day) { int i ,标点的,, case 7, ( year%400==0 ) ) sum=sum+29, case 4,,改了一下, case 8,sum),%d&quot,),i&lt,sum=%d&quot, void fun2(int year, sum=sum+31,&year), scanf(&quot,month,break,调试通过,Input month=&quot,i++) { switch (i) { case 0, void fun1(int year ),sum , sum=sum+30, case 12,day, printf(&quot,day),你可以试下的 呵呵, case 11,, scanf(&quot, void main() { int year,month,, printf(&quot,,), if( (year%4==0 && year%100 != 0) , case 9,break, fun2(year,Input day=&quot, for(i=0,sum=0, printf(&quot,h&gt,&month),煤每纯椿∈榘伞 #include &lt, }
这个也是转载来的 很不错哦, sum=sum+day, printf(&quot, else sum=sum+28,break, case 6,%d&quot, } } } void fun1 (int year) { int sum = 0 ,int month,Input year=&quot,stdio,sum, case 2, } void fun2(int year, case 3,int month, scanf(&quot,函数体写法的,&day),你要表达的功能也没写清楚,芏嘤锓ù砦,
我是新手,照书上打的,怎么调试都是出问题,程序哪里错啊
其他类似问题
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁}

我要回帖

更多关于 semiformal 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信