int Nhap(NGUOI **p)
{
int i = 0;
int selection = 1;
while (selection != 6)
{
cout << "NHAP: 1.SINHVIEN, 2.HOCSINH, 3.CONGNHAN, 6.quit: ";
cin >> selection;
if (selection == 1)
{
p[i] = new SINHVIEN;
p[i]->Nhap();
i++;
continue;
}
if (selection == 2)
{
p[i] = new HOCSINH;
p[i]->Nhap();
i++;
continue;
}
if (selection == 3)
{
p[i] = new CONGNHAN;
p[i]->Nhap();
i++;
continue;
}
}
/*for (int j = 0; j < i; j++)
{
p[j]->Print();
cout << endl;
}*/
cout << "gia tri i: " << i;
return i;
}
cout << Nhap§;
Mọi người xem giúp mình. Cảm ơn

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?