I am a newbie to C++ and I'm not sure of anything at this point in time however,I got a problem with the starting phase of this program that well prompt the user to input a single character and output a inter4national Civil Aviation Word !!!!! The prolem that I have is that you have to enter a character before it will start and it closes after just one entry I don't see what is wrong!!!! Can somebody Help
Thanks for your time
#include "stdafx.h"
# include <iostream>
using namespace std;
int main()
{
int a;
char letter;
cin>>letter;
cout << "Enter a single capitalize character, Example A:";
cin >> letter;
switch (letter)
{
case 'A': cout << "ALPHA"; // do something
break;
case 'B': cout << "Bravo"; // do something
break;
case 'C': cout << "Charlie";
break;
case 'D': cout << "Delta";
break;
case 'E': cout << "Echo";
break;
case 'F': cout << "Foxtrot";
break;
case 'G': cout << "Gulf";
break;
case 'H': cout << "Hotel";
break;
case 'I': cout << "India";
break;
case 'J': cout << "Juliet";
break;
case 'K': cout << "Kilo";
break;
case 'L': cout << "Lima";
break;
case 'M': cout << "Mike";
break;
case 'N': cout << "November";
break;
case 'O': cout << "Oscar";
break;
case 'P': cout << "Papa";
break;
case 'Q': cout << "Quebec";
break;
case 'R': cout << "Romeo";
break;
case 'S': cout << "Sierra";
break;
case 'T': cout << "Tango";
break;
case 'U': cout << "Uniform";
break;
case 'V': cout << "Victor";
break;
case 'W': cout << "Whiskey";
break;
case 'X': cout << "X-ray";
break;
case 'Y': cout << "Yankee";
break;
case 'Z': cout << "Zulu";
break;
default : cout << "Error";
}
cin >> a;
return 0;
}