-2

I get in Visual Studio C++ these errors: 'NuovoUtente': undeclared identifier and 'CercareUtente': undeclared identifier

Please answer if you now why i get these errors.

This is my Code:

Code

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Antonio Gschossmann
  • 532
  • 1
  • 7
  • 18

1 Answers1

3

Those errors look reasonable because you never defined those values anywhere in your program. From your program, it looks like you're trying to have the user enter a string and then check whether they entered a specific piece of text, but right now you're reading in a number and then comparing it against a nonexistent variable. Did you mean something like this?

string input;
getline(cin, input);

if (input == "NuovoUtente") { // Note the == and the quotation marks
    ...
} else if (input == "CercareUtente") {
    ...
}
templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065