Now that I got Dev-C++ working I started looking at the tutorials on this site. After a while I wanted to see if I could put together a tiny program without making any mistakes...I failed.
It's crappy I know but for some reason it wont let me use characters as a variable. I've changed it to int choice and that worked I just don't know why it won't let me use char. It's probably an obvious mistake I've made but if anyone can help me...Code:#include <iostream>
using namespace std;
int main()
{
char choice;
cout<<"Would you like to start the game? (Y/N) ";
cin>> choice;
cin.ignore();
if ( choice == Y ) {
cout<<"You are in a large cave. There is an exit to the north and the west.\nWhich path do you take? (S/W) ";
cin>> letter;
cin.ignore();
if ( Choice == S ) {
cout<<"You fall into a large pit full of snakes. GAME OVER!\n";
}
if ( choice == W ) {
cout<<"You escape the cave! Congratulations!\n";
}
if ( choice == N ) {
cout<<"Thank you for playing.\n";
}
cin.get();
}}
Thanks.