成绩表!!错误!运行不出来了!!
2012-12-09 15:11
239 查看
/* *程序的版权和版本声明部分 *Copyright(c)2012,烟台大学计算机学院学生 *Allrightsreserved. *文件名称:x.cpp *作者:孙培培 *完成日期:2012年12月7日 *版本号:v1.0 *输入描述: *问题描述:成绩排序 *程序输出: 成绩排序 */
#include<iostream>
#include<string>
usingnamespacestd;
constintn=12;//不变量
voidpmscore(doublescore
,stringname
);//按成绩排序
voidpmname(doublescore
,stringname
);//按姓名排序
intmain()
{
inti;
doublescore
;
stringname
;
for(i=0;i<n;i++)
{
cout<<"请输入第"<<i+1<<"位同学的名字:";
cin>>name[i];
cout<<"";
cout<<"成绩:";
cin>>score[i];
cout<<endl;
}
cout<<"按姓名排名:"<<endl;
pmname(score,name);
for(i=0;i<n;i++)
{
cout<<"第"<<i+1<<"个:"<<name[i]<<"成绩:"<<score[i]<<endl;
}
cout<<"按成绩排名:"<<endl;
pmscore(score,name);
for(i=0;i<n;i++)
{
cout<<"第"<<i+1<<"名:"<<name[i]<<"成绩:"<<score[i]<<endl;
}
return0;
}
voidpmname(doublescore
,stringname
)
{
inti,j,t;
stringq;
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(name[i]<name[i+1])
q=name[i];
name[i]=name[i+1];
name[i+1]=q;
t=score[i];
score[i]=score[i+1];
score[i+1]=t;
}
}
}
voidpmscore(doublescore
,stringname
)
{
inti,j,t;
stringq;
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(score[i]<score[i+1])
t=score[i];
score[i]=score[i+1];
score[i+1]=t;
q=name[i];
name[i]=name[i+1];
name[i+1]=q;
}
}
}
fatalerrorC1083:Cannotopencompilergeneratedfile:
'Debug/桌面\tyu.obj':Nosuchfileordirectory
什么意思啊!!有没有知道的!帮帮忙哎!
相关文章推荐
- 在windows直接运行Qt编译出来的可执行程序出现了如下提示错误: this application has requested the runtime to terminate it an unu
- SDL控件随窗口变化(解决编译无错误但运行不出来!!)
- javascript代码运行不出来执行错误的可能情况整理
- javascript代码运行不出来执行错误的可能情况整理
- 为什么myeclipse自带的tomcat可以运行 而重新安装的tomcat不能,运行出来显示404错误, not available
- 在windows直接运行Qt编译出来的可执行程序出现了如下提示错误: this application has requested the runtime to terminate it an unu
- C/C++/MFC 编译运行错误解决方法收集error
- 运行mysqli_connect apache报服务器500错误
- spark编译及运行常见错误
- 17个新手常见Python运行时错误
- 运行Visual Studio 2003或Visual Studio 2008提示"找不到一个或多个组件,请重新安装该应用程序"错误的解决方法!
- iphone开发 运行模拟器出现"ARC forbids explicit message send of 'retain' 错误信息
- 在ASP 调用 VB.net 编写的dll 出错 提示:Microsoft VBScript 运行时错误 错误 '800a01ad' ActiveX 部件不能创建对象
- windows 下将caffe的运行日志打印出来
- 用记事本编写第一个Java程序运行时 出现报错:错误: 类helloworld是公共的, 应在名为 helloworld.java 的文件中声明 public class helloworld {
- excel模版从xp复制到win7系统后出现错误 运行时错误 '429' ActiveX 部件不能创建对象
- HOWTO:捕获ActiveX Script Host中的运行时错误
- fatal error C1859 意外的预编译头错误,只需重新运行编译器
- 用Visual C#.NET编写服务器日期控件(转)稍做改动,运行时不会报CalendarEnum找不着错误
- eclipse在tomcat服务器运行jsp时提示以下错误