vc++-VC++运行出现错误,但应该可以的啊···

问题描述

VC++运行出现错误,但应该可以的啊···

#include
#include
#include
#definr N 3
using namespace std;
struct Worker
{string num;
string name;
int base;
int overtimepay;
int prize;
int takeout;
int realpay;
};
void inputfile(ofstream &outData)//输入数据
{
struct Worker a:
cout<<"输入编号:"; cin>>a.num;
cout<<"输入姓名:"; cin>>a.name;
cout<<"输入基本工资:"; cin>>a.base;
cout<<"输入加班工资:"; cin>>a.overtimepay;
cout<<"输入奖金:"; cin>>a.prize;
cout<<"输入扣除:"; cin>>a.takeout;
a.realpay=a.base+a.overcomepay+a.prize_a.takeout;
outData<
}
void print(ifstream &inData)//输出数据
{
struct worker b;
cout
while(!indata.eof())//从文件中读数据,直到遇到文件结束
{ inData>>b.num>>b.name>>b.base>>b.overtimepay>>b.prize>>b.takeout>>b.realpay;
cout<<<b.num<<setw(4)<<b.name<<setw(4)<<b.base<<setw(4)<<b.overtimepay<<setw(4)<<b.prize<<setw(4)<<b.takeout<<setw(4)<<b.realpay<<endl;}
}
void main()
{
int i;
ifstream inData;//输入数据
ofstream outData;//
outData.open("E:Salary.txt");//打开文件
for(i=1;i<=N;i++)
{
inputfile(outData);
}
outData.close();
inData.open("E:Salary.txt");
print(inData);
inData.close();
}
结果:--------------------Configuration: ff - Win32 Debug--------------------
Compiling...
Command line warning D4028 : minimal rebuild failure, reverting to normal build
ff.cpp
i:c++ff.cpp(0) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file '.pdbmgr.cpp', line 113)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Error executing cl.exe.

ff.exe - 1 error(s), 1 warning(s)

解决方案

具体的错误是什么?是运行过程中程序崩溃了吗?还是其他的,出错的代码是哪一行?不要上来就发全部代码,只发关键的错误代码就行了

解决方案二:

冯·诺伊曼

解决方案三:

好像vc++运行不了所有c++程序。。。

解决方案四:

void main()函数没有参数,你加个参数试试

 int main(int argc, char* argv[])
时间: 2024-07-31 04:24:18

vc++-VC++运行出现错误,但应该可以的啊···的相关文章

指针-车辆检测的代码运行有错误

问题描述 车辆检测的代码运行有错误 报错如图,应该是那个指针的问题?那应该怎么改? 解决方案 可能是pCapture 解决方案二: 建议用gdb或者cout去输出一下看看,或者调整一下输入的大小,一般这种程序为了效率,内存都是分配一块很长的连续内存,如果输入太大或者太小很容易会操作敏感区域的内存.有时候输入很大,超出限制之后,分配的内存会从0开始,一下就内存错误了.

math.h-为何这段代码在DEV中运行结果错误

问题描述 为何这段代码在DEV中运行结果错误 #include<stdio.h> #include<math.h> int main() { int i; for(i=100;i<1000;i++) if(i==pow(i%10,3)+pow(i/100,3)+pow(i/10%10,3))printf("%dn",i); return 0; } 求所有3位数水仙花数 我提交到蓝桥杯练习平台结果却是正确的 解决方案 printf("%dn&quo

ns3-ns-3编译运行出现错误

问题描述 ns-3编译运行出现错误 ns-3新手,无法编译运行scratch目录的*.cc脚本,提示program 'scratch/*'not found,available program are:......,该怎么解决啊?谢谢 解决方案 http://zzgthk.iteye.com/blog/1283626 解决方案二: http://blog.csdn.net/piyajee/article/details/5894259

c语言 树结构 二叉树-初学二叉树 运行有错误 瞅了几个小时无果 大神帮帮忙 找出错误在哪

问题描述 初学二叉树 运行有错误 瞅了几个小时无果 大神帮帮忙 找出错误在哪 ![图片说明](http://img.ask.csdn.net/upload/201503/07/1425715444_303984.png #include #include typedef struct Tree { int date; struct Tree *lson,*rson; }tree , *ztree; int a[200005]; ztree creat(ztree t,int n) { int h

参数-VSTO运行出现错误,使word启动后开发项无法运行

问题描述 VSTO运行出现错误,使word启动后开发项无法运行 VSTO运行后,出现如下错误:"SignFile"任务不支持"TargetFrameworkVersion"参数.请确认参数存在于此任务中,并且是可设置的公共实例属性未能使用"SignFile"任务的输入参数初始化该任务. 请问是什么原因啊,如何解决呢?谢谢啦... 解决方案 是不是版本的问题?........ 解决方案二: 楼主问题解决没有? 我也遇到类似问题,不过是excel程序

java代码运行出现错误“Address already in use: Cannot bind”

问题描述 java代码运行出现错误"Address already in use: Cannot bind" 这是数据接受端代码: import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.SocketException; public class ReceiveUDP { public static void main(Stri

eclipse-Android写的项目无法在模拟器上运行,错误在下面,怎么解决

问题描述 Android写的项目无法在模拟器上运行,错误在下面,怎么解决 错误是:No content provider found for permission revoke: file:///data/local/tmp/musicplayer.apk 解决方案 这种比较少见 是不是缺少安装权限? 因为这个目录不是随便能安装的 解决方案二: 没有权限的话应该是不能安装到这个目录的,你先安装到sdcard目录下,看看能不能装上,如果还不能你在看后台打印的错误信息

genymotion运行的错误

问题描述 genymotion运行的错误 VirtualBox cannot start the virtual device这样的提示错误,有木有遇到过的~求解决 解决方案 是不是第一次运行? 得先装VirtualBox才能运行Genymotion

hadoop-nutch分布式运行问题错误提示38954拒绝连接

问题描述 nutch分布式运行问题错误提示38954拒绝连接 nutch在单机模式下可以正常运行,hadoop可以正常运行,把hadoop/etc/hadoop/*下面的配置文件导入nutch的conf文件下面,ant编译后,运行runtime/deploy下的.bin/crawl hdfs://n1:9000/urls/ hdfs://n1:9000/mydir/ aa 2(没用solr,代码已经注释,所以打什么参数都可以) 结果报错,提示n1:38954拒绝连接,我上网上查38954端口没有