Reference Parameters

Hello!!
I know I am messing up bad somewhere but where exactly I can't tell. Please help!!

#include <iostream>

using namespace std;
void ZombieMove(int xCoord, int yCoord);
void CheckForBrains(int xCoord, int yCoord);
int main()
{



cout << "The Zombie begins his quest for brains at coordinates 0, 0." << endl;
for (int i = 0; i <= 100; i++)
{
int x, y;
CheckForBrains;
ZombieMove;
}
cout << "One hundred turns later, a concerned citizen with a shotgun blasts the zombie to bits at coordinates 8, -2." << endl;




return 0;
}
void ZombieMove(int xCoord, int yCoord)
{
unsigned int ZombieSpeed = 1;
ZombieSpeed = rand() % 4;
if (ZombieSpeed = 1 || 3)
{
ZombieSpeed + xCoord;
}
else
{
ZombieSpeed + yCoord;
}

}
void CheckForBrains(int xCoord, int yCoord)
{

xCoord = 0;
yCoord = 0;
int randomCheck;

randomCheck = rand() % 20;
if (randomCheck = 1)
{
cout << "The Zombie ate a brain at coordinates " << CheckForBrains << ". Poor dead citizen." << endl;
}

}
I think you are not returning the values from your two functions!!
Topic archived. No new replies allowed.