So those of you who saw my topic yesterday told me that the variable type "char" can only store one letter, as opposed to a word. So i made a new script using letters instead of words for the variable, yet my compiler still says there is an error. Can someone tell me what the error is?
Thank you to all who answer.Code:#include <iostream> using namespace std; int main() { char choice; cout<<"Welcome to the Super Quiz Game!\n"; cout<<"I will be asking you a series of\n"; cout<<"of multiple choice questions, and\n"; cout<<"see how many you can answer! Ready?\n"; cin.get(); cout<<"lets begin\n"; cin.get(); cout<<"What two nations fought in the War of 1812?\n"; cout<<"A. France and Canada\n"; cout<<"B. America and Britian\n"; cout<<"C. Mexico and America\n"; cin>> choice; cin.ignore(); if ( choice == b ) { cout<<"You are correct!\n"; } cin.get(); }



Reply With Quote![[C++] Why won't this compile?](http://ragezone.com/hyper728.png)


