Originally Posted by
rogster001
This tutor is UK university though, i cannot imagine he/she has explicitly stated use ' void main()' unless as a means to setup up a learning discussion later in the course, there is no way they could be ignorant, or 'against' the standard and have got the lecturer position in the first place.... I hope.
Someone in the class was moaning about how he tried to fix an error and just made it worse.
Anyway I've done a simple menu system to move the wizard. Can anyone show me how to add a code so that when I move the wizard to the left, the co ordinates change?
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
int loop=1;
int choice;
string getinput;
while(loop==1)
{
system("CLS");
cout << ":Menu::\n\n"
<< "1. Question\n"
<< "2. Exit\n\n";
cin >> choice;
switch(choice)
{
case 1:
system("CLS");
cout << "::The Wizard is idle. \n\n"
<< "Which Direction would you liek to move?\n\n";
cin >> getinput;
if(getinput=="right")
{
system("CLS");
cout << "The Wizard has moved right";
system("PAUSE");
} if(getinput=="left")
{
system("CLS");
cout << "The Wizard has moved left";
system("PAUSE");
}
case 2:
if(choice==2)
{
exit(0);
}
}
}
}