Alright the three errors I got and don't understand are these (coming from Microsoft Visual C++ Express Edition)
error C2065: 'cin' : undeclared identifier
error C2446: '==' : no conversion from 'const char *' to 'int'
There is no context in which this conversion is possible
error C2040: '==' : 'int' differs in levels of indirection from 'const char [2]'
#include <iostream>
/*
RPGTeXT
*/
// Start of RPGTeXT
int main()
{
char ready;
char Y;
char N;
printf ("Welcome to RPGTeXT! \n");
printf ("Copyright by Suite4Gamers \n");
printf ("Contact us at imoddedu@suite4gamers.com \n");
printf ("Lets get the game STARTED!");
system ("PAUSE");
//Game Start
printf ("Welcome to RPGTeXT \n");
printf ("Are you ready to play? \n");
printf ("Type Y for Yes \n");
printf ("Type N for No \n");
cin>>ready;
{
if (ready == "Y")
system ("PAUSE");
}
}
// End of RPGTeXT
cin is part of the std namespace. Either explicitly invoke the std namespace by using std::cin or put usingnamespace std; at the top of your file after the includes.
error C2446: '==' : no conversion from 'const char *' to 'int'
'ready' is of type char. "Y" is a string. You probably want to compare to the character Y and not the string Y (there's a difference).