jvolel
Destoryer of worlds
maybe easy for some or most of you but not for me :-(
i get 1 error: call to undefined function in funcion main
(this is using c++ am a newbie and am just starting out the whole programing thing) also anyone know how i can make it loop so that the player chooses yes they continue from the beging or if a person chooses no they get a game over message
#include
#include
void main()
{
char ans, choice1, choice2;
cout<<"In order to play this game two players are required";
cout<<"choose from the selection.";
cout<<" P. Paper ";
cout<<" R. Rock ";
cout<<" S. Scissors ";
cout<<"Player #1 enter your selection";
cin>> choice1;
choice1 = toupper(choice1);
cout<<"Player #2 enter your selection";
cin>> choice2;
choice2 = toupper(choice2);
{
if (choice1 == 'P' && choice2 == 'P')
{cout << "no one wins";}
if (choice1 == 'R' && choice2 == 'R')
{cout << "tie";}
if (choice1 == 'P' && choice2 == 'R')
{cout<<"Player #2 wins";}
if (choice1 == 'R' && choice2 == 'P')
{cout << "You dumb ass, Player #1 wins";}
if (choice1== 'S' && choice2 == 'S')
{cout << "no one wins";}
if (choice1 == 'P' && choice2 == 'S')
{cout << "Ohh to bad, Player #2 wins";}
if (choice1 == 'S' && choice2 == 'P')
{cout << "Now how you gonna go pick paper, Player #1 wins";}
if (choice1 == 'R' && choice2 == 'S')
{cout << "sorry Player #1 wins";}
if (choice1 == 'S' && choice2 == 'R')
{cout << "player #2 wins";}
cout<< "Do you wish to continue?";
cin>> "Y/N";}} any help is appreciated
if its a function i didnt declare then um how would i declare it i swear i dont know lain:
i get 1 error: call to undefined function in funcion main
(this is using c++ am a newbie and am just starting out the whole programing thing) also anyone know how i can make it loop so that the player chooses yes they continue from the beging or if a person chooses no they get a game over message
#include
#include
void main()
{
char ans, choice1, choice2;
cout<<"In order to play this game two players are required";
cout<<"choose from the selection.";
cout<<" P. Paper ";
cout<<" R. Rock ";
cout<<" S. Scissors ";
cout<<"Player #1 enter your selection";
cin>> choice1;
choice1 = toupper(choice1);
cout<<"Player #2 enter your selection";
cin>> choice2;
choice2 = toupper(choice2);
{
if (choice1 == 'P' && choice2 == 'P')
{cout << "no one wins";}
if (choice1 == 'R' && choice2 == 'R')
{cout << "tie";}
if (choice1 == 'P' && choice2 == 'R')
{cout<<"Player #2 wins";}
if (choice1 == 'R' && choice2 == 'P')
{cout << "You dumb ass, Player #1 wins";}
if (choice1== 'S' && choice2 == 'S')
{cout << "no one wins";}
if (choice1 == 'P' && choice2 == 'S')
{cout << "Ohh to bad, Player #2 wins";}
if (choice1 == 'S' && choice2 == 'P')
{cout << "Now how you gonna go pick paper, Player #1 wins";}
if (choice1 == 'R' && choice2 == 'S')
{cout << "sorry Player #1 wins";}
if (choice1 == 'S' && choice2 == 'R')
{cout << "player #2 wins";}
cout<< "Do you wish to continue?";
cin>> "Y/N";}} any help is appreciated
if its a function i didnt declare then um how would i declare it i swear i dont know lain: