ok here is my code
#include <iostream>
#include <ctime>
using namespace std;
int main(void)
{
char cName[81] = "",
cUser[9] = "",
szComp[9] = "",
szr[5] = "Rock",
szp[6] = "Paper",
szs[9] = "Scissors";
int cComp = 0;
srand(static_cast<unsigned int>(time(0)));
cComp = rand()%3;
if (cComp == 0)
strcpy_s(szComp,szr);
if (cComp == 1)
strcpy_s(szComp,szp);
if (cComp == 2)
strcpy_s(szComp,szs);
cout << "The game of paper, rock and scissors is played by having each player" << endl
<< "select either paper, rock, or scissors as their move for each round." << endl
<< "A winner is determined by the combination that was played, where paper" << endl
<< "covers rock and wins, scissors cuts paper and wins, or rock smashes" << endl
<< "scissors and wins. You will play one round of this game." << endl << endl;
cout << "please enter your name: ";
cin.getline(cName, 81);
cin.ignore(cin.rdbuf() ->in_avail());
cout << endl << "have fun, " << cName << "!" << endl << endl
<< "Press Any Key to Continue" << endl << endl;
cout << cName << ", Please select rock, paper or scissors..." << endl << endl
<< "Rock" << endl << "Paper" << endl << "Scissors" << endl;
cout << "Your Selection: ";
cin.getline(cUser, 9);
cout << cName << " has played " << cUser << endl
<< "The computer has played " << szComp << endl;
switch(cUser)
{
case 'Rock':
if (szComp == "Rock")
cout << "Its a Tie." << endl;
if (szComp == "Paper")
cout << "Sorry you lose." << endl;
if (szComp == "Scissors")
cout << "You Win." << endl;
break;
case 'Paper':
if (szComp == "Rock")
cout << "You Win." << endl;
if (szComp == "Paper")
cout << "Its a Tie." << endl;
if (szComp == "Scissors")
cout << "sorry You lose." << endl;
break;
case "Scissors":
if (szComp == "Rock")
cout << "Sorry you lose." << endl;
if (szComp == "Paper")
cout << "You Win." << endl;
if (szComp == "Scissors")
cout << "Its a Tie." << endl;
break;
}
cin.get();
return 0;
}
i am currently getting 3 errors and i dont know what to do