Hey, i was just going to start making a game where srand made a random number between 1&99 and that is the power you would hit of someone else, the one to defeat the other person won,
I got some prefix errors etc :
#include <conio.h>
#include <iostream>
using namespace std;
int main()
{
int 1attack, 2attack, 1hp, 2hp;
char attack;
cout << "Player 1, Press 'A' to attack : ";
cin >> attack;
switch(attack)
{
case 'a':
case 'A':
srand ( time(NULL) );
1attack = rand() % 99 + 1;
cout << "You hit " << 1attack << "!";
break;
case default:
cout << endl << "INVALID SELECTION!";
break;
}
getch();
}
I was going to put this on to ask for help with how to do things with the game so i'll leave this thread for help with the errors and maybe some help with the game :)?