Here is the code:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
char input;
cout<< "Hello" <<endl;
system("PAUSE");
cout<<"Enter any letter in the English alphabet and I will make a word with that letter."<<endl;
cin>> input;
cout<<"So you entered " << input cout<<"Here is my response:"<<endl;
system("PAUSE");
switch (input)
{
case "a":
cout<<"Anus";
system("PAUSE");
break;
default:
cout<<"Cant do that, try again";
break;
}
return 0;
}
The errors i get are:
.\abc.cpp(16) : error C2146: syntax error : missing ';' before identifier 'cout'
.\abc.cpp(22) : error C2051: case expression not constant
.\abc.cpp(33) : warning C4065: switch statement contains 'default' but no 'case' labels
Thanks in advance,
ZOMBIE!!!

New Topic/Question
Reply




MultiQuote






|