If statments using char variable, need help
When writing a script using the char variable, using if statments.. how do you write it?
I'm trying to make so that it checks if a specific name is typed, and if it is, it defines the name.
Code:
#include <iostream>
using namespace std;
int main()
{
char name;
cout<<"Enter a name";
cin>> name;
cin.ignore();
if ( char*name () Shayne ) {
cout<<"Shayne is a twenty fifth dinosaur pagent.\n";
}
else if ( char*name () Jamie ) {
cout<<".... and so on and so on for like 10 names..\n";
}
else {
cout<<"....\n";
}
cin.get();
}
That's what I am working with But I am pretty much a noob and can't get it to work. I get errors on the line with Shayne and Jamie.