Anyone can help the first if is not work what should i do?
#include <array>
#include <iostream>
#include <string>
int main () {
std::string name;
std::array <string, 5> database{"Maxi", "Klimi", "Carlos", "lennyface", "TheSpartan };
std::cout << "please enter a name to check against our database";
std::cout >> name;
for (auto i: database) {
if (name == i) {
std::cout << "the name was found!";
goto end;
}
}
std::cout << "the name wasn't found";
end:
}