注册 登录
编程论坛 C++教室

编译出错

shizhusz110 发布于 2007-03-14 21:38, 477 次点击
我写个c++程序不能运行!!!build:没错,但是运行的时候:出现个小的提示框,显示:无法执行程序
我也不知道怎么搞??谢谢回复
7 回复
#2
song42007-03-14 23:17

内存操作问题
代码上来

#3
shizhusz1102007-03-15 16:52

谢谢!!!!

#include<iostream>
using namespace std;

#ifndef DATE_H


#define DATE_H
class date
{int mo,da;
public:
date(int i,int j)
{
mo=i;
da=j;
}
void display() const
{
cout<<mo<<"-"<<endl;
}
};
#endif

#include<iostream>
#include"data.h"
using namespace std;

int main(int argc,char *argv[])
{
date t(12,31);

t.display();
return 0;
}

#4
Jackzdong2007-03-19 18:10

能够编译通过? 好像没有 data.h 这个头文件吧

#5
song42007-03-19 19:16
class date你却
#include"data.h"
估计你文件名取错了
#6
aipb20072007-03-19 20:13
以下是引用song4在2007-3-19 19:16:32的发言:
class date你却
#include"data.h"
估计你文件名取错了

这样能通过编译吗???

#7
yuyunliuhen2007-03-19 21:21
这估计是你的系统问题了,或许与硬件有关..
#8
shizhusz1102007-03-20 16:14

谢谢!!!
1