[ create a new paste ] login | about

Link: http://codepad.org/O6EIegc0    [ raw code | output | fork ]

C++, pasted on Apr 24:
void nhapsach(Sach &s)
{
	getchar();
	cout << "Nhap ma sach: ";
	getline(cin, s.m);
	cout << "Nhap ten sach: ";
	getline(cin, s.ten);
	cout << "Nhap ten tac gia: ";
	getline(cin, s.tg);
	cout << "Nhap nha xuat ban:";
	getline(cin, s.nhxb);
	cout << "Nhap gia ban: ";
	cin >> s.gia;
	cout << "Nhap so trang: ";
	cin >> s.st;
	cout << "Nhap nam xuat ban: ";
	cin >> s.namxb;
}
void xuatsach(Sach s)
{
	cout << endl << "Ma sach: " << s.m;
	cout << endl << "Ten sach: " << s.ten;
	cout << endl << "Ten tac gia: " << s.tg;
	cout << endl << "Nha xuat ban: " << s.nhxb;
	cout << endl << "Gia ban: " << s.gia;
	cout << endl << "So trang: " << s.st;
	cout << endl << "Nam xuat ban: " << s.namxb;
}


Output:
1
2
Line 1: error: variable or field 'nhapsach' declared void
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: