LẬP TRÌNH NÂNG CAO LÝ THUYẾT TRÒ CHƠI

4 65 0
LẬP TRÌNH NÂNG CAO LÝ THUYẾT TRÒ CHƠI

Đang tải... (xem toàn văn)

Thông tin tài liệu

#include #include #include class ts { char *ma,*ten; float toan,ly,hoa; public: ts(); ~ts(); ts&operator=(ts &); ts(const ts &); friend ostream&operator(istream &is,ts &); float tong(); }; ts::ts() { ma=new char[10]; ten=new char[25]; toan=0; ly=0; hoa=0; }; ts::~ts() { delete ma; delete ten; toan=0; ly=0; hoa=0; }; ts&ts::operator=(ts &t) { ma=new char[10]; ten=new char[25]; strcpy(ma,t.ma); strcpy(ten,t.ten); toan=t.toan; ly=t.ly; hoa=t.hoa; return t; }; ts::ts(const ts &t) { ma=new char[10]; ten=new char[25]; strcpy(ma,t.ma); strcpy(ten,t.ten); toan=t.toan; ly=t.ly; hoa=t.hoa; }; ostream&operator

Ngày đăng: 26/02/2019, 19:52

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan