// Поиск государства по названию
State* findStateByName(const string& name) {
Element<State>* current = stateList.getHead();
while (current != nullptr) {
if (current->getInfo().getName() == name) {
return &(current->getInfo());
}
current = current->getNext();
}
return nullptr;
}
and
// Фильтрация государств по площади
void printStatesByArea(double minArea, double maxArea) {
Element<State>* current = stateList.getHead();
while (current != nullptr) {
const State& state = current->getInfo();
if (state.getArea() >= minArea && state.getArea() <= maxArea) {
cout << state << endl;
}
current = current->getNext();
}
}
are equal.
check if
```
// Поиск государства по названию
State* findStateByName(const string& name) {
Element<State>* current = stateList.getHead();
while (current != nullptr) {
if (current->getInfo().getName() == name) {
return &(current->getInfo());
}
current = current->getNext();
}
return nullptr;
}
```
and
```
// Фильтрация государств по площади
void printStatesByArea(double minArea, double maxArea) {
Element<State>* current = stateList.getHead();
while (current != nullptr) {
const State& state = current->getInfo();
if (state.getArea() >= minArea && state.getArea() <= maxArea) {
cout << state << endl;
}
current = current->getNext();
}
}
```
are equal.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
check if
and
are equal.
They are not equal. They are doing different things.