refactoring int main()

This commit is contained in:
gandc 2024-05-23 02:10:53 +03:00
parent 09064192ef
commit f2e2c80652
Signed by: gandc
GPG Key ID: 9F77B03D43C42CB4

13
pr6.cpp
View File

@ -519,16 +519,8 @@ int main() {
}
cout << endl;
//StateList for 6.1
/*StateList states;*/
// Создание указателя на объект StateList for 6.2
StateList* states = new StateList();
// for 6.1
/*states.addState(State("USA", "Washington D.C.", "English", 328000000, 9833510));
states.addState(State("India", "New Delhi", "Hindi", 1380000000, 3287263));*/
//stateList.addState(usa);
//stateList.addState(india);
StateList* states = new StateList();
//for 6.2
states->addState(State("USA", "Washington D.C.", "English", 328000000, 9833510));
@ -537,9 +529,6 @@ int main() {
cout << "List of states:" << endl;
cout << states->findStateByName("USA") << endl;
//cout << "Removing state:" << endl;
//cout << stateList.removeState() << endl;
cout << "States with area between 9800500 and 9987263:" << endl;
states->printStatesByArea(9800500, 9987263);