|
Minsk192 Newbie
Joined: 02 Mar 2002 Posts: 7
|
Posted: Tue May 07, 2002 10:01 pm
C++ question... |
int main();
char c, name;
void GetName()
{
cout << "** Welcome To Paint-Ball Wars. **n";
cout << "What shall I call you?n", name;
scanf ("%c", &name); // read user's name
cout << "Is " << name << " correct, (Y or N)?n", Name;
cin >> c; // read the user's choice
switch (c) {
case 'Y' : cout << "Hello" << name <<"."; // Get correct name
break;
case 'N' : cout << "Please enter your correct name.", GetName();
break;
default : exit(0);
break;
}
Start();
return 0;
}
---------------------------------------------
I know that the, scanf statement is not right for C++, but if someone knows the correct statement and could tell me, i would really appreciate it. Also, it dosnt seem to be recognizing the %name, value.
-~~~===|!!MINSK!!|===~~~- |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed May 08, 2002 12:53 am |
This is not zMUD related. Although I know that many people here might be able and are willing to help you, you need to post this somewhere concerning C++ and not zMUD. Sorry.
Kjata |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|