Hi, I am new here and I am trying to learn C++. I am trying to use if statements to switch between different ouptuts when the string in argument 3 is chosen. I do not understand why its not working. Could some one explain what is wrong with my if statement?
well, first of all, you need a return statement or something, since this is a function that's being called by main, right? That's why it won't compile. Also, I think you meant to use a string type instead of a char, since you included <string>. If you did that, it would solve the problem of line 10, since that also returns an error, but you should also use a double quote there.
EDIT: you can also use char array- in that case you have to compare every chars with "Mike" using a loop.
using string instead of char array as the example is simpler.