I'm really new to coding. In my program, I'm trying to assign proper prefixes to countries. For example: putting in "Philippines" gives out "les Philippines".
Anyway, I'm trying to find if a country is in my "plain" list of exceptions of countries that don't need a prefix. So if you put in "israel" you only get "Israel"
string country;
string prefix;
string plain = "Isreal, Madagascar, Sri Lanka, Singapore, Monaco, Cuba, Cyprus";
string masculine = "Belize, Camboge, Mexique, Mozambique, Costa Rica, Zimbabwe, Honduras";
I'm assuming I need something like this:
if (plain.find(country))
{
prefix = "";
}
but it's not working? Can someone explain how it works? I could do a long if statement, but I'd rather avoid that.