C++:abnormal program termination //我的编译器是VC6.0#include#include#include//using namespace std;class Date{int year,month,day;void init();public:Date(const std::string& s);Date(int y=2000,int m=1,int d=1);void display(); friend ostream& opera

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 09:45:43
C++:abnormalprogramtermination//我的编译器是VC6.0#include#include#include//usingnamespacestd;classDate{int

C++:abnormal program termination //我的编译器是VC6.0#include#include#include//using namespace std;class Date{int year,month,day;void init();public:Date(const std::string& s);Date(int y=2000,int m=1,int d=1);void display(); friend ostream& opera
C++:abnormal program termination
//我的编译器是VC6.0
#include
#include
#include
//using namespace std;
class Date{
int year,month,day;
void init();
public:
Date(const std::string& s);
Date(int y=2000,int m=1,int d=1);
void display();
friend ostream& operator

C++:abnormal program termination //我的编译器是VC6.0#include#include#include//using namespace std;class Date{int year,month,day;void init();public:Date(const std::string& s);Date(int y=2000,int m=1,int d=1);void display(); friend ostream& opera
我用GCC来编译,由于编译器比较新,需要把iostream.h和iomainp.h改为iostream和iomainp,其它什么也没有变,编译成功,运行没有错误,结果:
2005-08-21
2008-9-114