I i have to make a Rock Paper Scissors Lizard Spock program, and im having trouble getting the computer choice to randomly choose a number from 0 - 4 to make a random choice. Please show me what I am doing wrong. This is wha tI have so far
#include <iostream>
#include <cstdlib>
using namespace std;
void ShowProgramHeader();
int main()
{
int PlayerChoice;
The rand() function uses a technique that allows it go generate random numbers based on a seed, but the seed starts off the same each time you run your program you need to use the srand() function and change the seed to, say, the system time in seconds, so it will always be different every time you run you application.
Also, this: CompChar = 'Lizard';, and all the other places you have more than one character inside signle character quotes, is wrong. You cannot assign multiple characters to one character - good compilers will give you an error for this.