السلام عليكم و رحمة الله و بركاته
أرجو المساعدة المستعجلة في هذا السؤال يا شباب حيث أنني قمت بعمل الجزء الخاص بالكلاس و أعتقد أنه ناقص
هذا هو السؤال:
You have a file called: file1.txt that has in the first line the number of persons, then a name and a number for each person.
The contents of file1.txt is
file1.txt
4
Ali
5384448
Yaser
2523344
Dawood
2233456
Badr
2235567
You must write a program that will read these numbers into a Person class, then open two output files each out1.txt and out2.txt
out1.txt will hold the persons name only.
out2.txt will hold the persons numbers only.
الحل ( أرجو المساعدة في تكملته )
Class Person {
private:
char[20] name;
int number;
public:
char * getname( ) ;
int getnumber( ) ;
void putname (char * ) ;
void putnumber( int ) ;
......
};
