1. Trang chủ
  2. » Giáo Dục - Đào Tạo

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

4 65 0

Đ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

Xem thêm:

TỪ KHÓA LIÊN QUAN

w