refactoring int main()
This commit is contained in:
parent
09064192ef
commit
f2e2c80652
13
pr6.cpp
13
pr6.cpp
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user