Here is the code:
#include <iostream> #include <string> using namespace std; void verb() { cout << "verb" << endl; } void substantiv() { cout << "substantiv" << endl; } void adjectiv() { cout << "adjectiv" << endl; } int main() { do{ string intro; cout << "Scrie si vrei si stii: "; cin >> intro; switch (intro) { case (intro == "verb"): verb(); break; case (intro = "substantiv"): substantiv(); break; case (intro ="adjectiv"): adjectiv(); break; default: cout << "Nu am gasit nik :( scrii pi ok.ru Alin S si am si adaug" << endl; break; } /*if (intro == "verb") { verb(); }else if (intro == "substantiv") { substantiv(); }else if (intro == "adjectiv"); { adjectiv(); }*/ } while (true); system("pause"); return 0; }