ascii and pointer trouble!!!
My friend wanted me to create a little programme that he can access but the teachers can't, using commands (because everything you do on the computers is tracked,) so I created the source code below but there is a problem with pointers and ASCII but I dont understand what the problem is!!! Please Help
#include <iostream>
using namespace std;
void seatingplans();
int main()
{
int command;
cout<<"\n\n\n\n\n";
cout<<" ****************************\n";
cout<<" * * * ******* *\n";
cout<<" * * * * *\n";
cout<<" * ******** * *\n";
cout<<" * * * * *\n";
cout<<" * * * ******* *\n";
cout<<" * *\n";
cout<<" ****************************\n\n";
cout<<" Press ENTER to continue! \n\n\n\n\n\n";
cin.ignore();
cout<<" ****************************\n";
cout<<" * * * * * *\n";
cout<<" * * * * * *\n";
cout<<" * * * * * * *\n";
cout<<" * * *** * * *\n";
cout<<" * * * * *\n";
cout<<" * *\n";
cout<<" ****************************\n\n";
cout<<" Property of Alex Pajak 2004 \n\n";
cout<<" Press ENTER To continue\n\n\n\n\n\n\n";
cin.ignore();
cout<<"Please enter a VALID server command!\n\n";
cout<<"Command: ";
cin>>command;
cin.ignore();
if ( command == "red27" ) //Problem 1
{
seatingplans();
}
}
void seatingplans()
{
int lesson;
cout<<"Please enter the lesson which you wish to view a seating plans for\n\n";
cin>>lesson;
cin.ignore();
cout<<"Lesson: ";
if ( lesson == "Geography" ) //Problem 2
{
cout<<"Below is the Geography seating Plan:\n\n";
}
else {
cout<<"Sorry The seating plan for " << lesson << " cannot be found!";
}
}
Thanks in Advance