Why won't my program compile?
-----------------------------------------------------------------------------------
/*
Name: Zero Guess
By: Ground Zero Unit(Golden Bunny)
Engine Started: May 03,2002
Engine Updated: May 03,2002
*/
#include <iostream>
#include <fstream.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string>
#include <windows.h>
#define data "data.dat"
void game();
int main()
{
bool bStillPlaying=true;
int response;
while (bStillPlaying) {
printf("\t\t**********************\n");
printf("\t\t** 1. Introduction **\n");
printf("\t\t** 2. Start Game **\n");
printf("\t\t** 3. Exit **\n");
printf("\t\t**********************\n");
printf("\t\tWhat is Thy Desire?\n ");
scanf("%i", response);
switch(response) {
case 1:
printf("\tZero Guess is one of the many side projects by Ground Zero.\n");
printf(" Not much to say about this title. Its just a slot game. Simply\n");
printf(" pick a difficulty level and in a few seconds the CPU will inform\n");
printf(" you what the maximum number will be. Its just a simple game. Nothing\n");
printf(" too special about this title. Just a quick game that took me 10 minutes\n");
printf(" to make. Enjoy!!!");
return 0;
break;
case 2:
game();
break;
case 3: bStillPlaying=false;
break;
default: printf("Sorry, couldn't understand that input. Bailing out.");
bStillPlaying=false;
break; }
cin.get();
return 0;
}
void game()
{
int pick, ez=0, norm=0, complex=0, life=5, sjob;
printf("\t1. Easy\n");
printf("\t2. Medium\n");
printf("\t3. Hard\n");
printf("\tWhat is Thy Desire? ");
scanf("%i", pick);
switch(pick) {
case 1:
printf("\nPlease wait while we search for the maximum number.");
for (int i=0;i<=16;i++) {
printf("-"); Sleep(200); }
printf("\n");
ifstream x(data);
x >> ez;
printf("The Maximum Number will be: %i", ez);
int right=rand() % ez;
x.close();
for (int z=life;z<=9;z++) {
printf("\nInput your guess: ");
scanf("%i", sjob);
if (sjob>=ez) {
printf("\nYou're higher than the number!!"); }
else if (sjob<=ez) {
printf("\nYou're lower than the number!!"); }
else if (sjob==ez) {
printf("\nYou're right!!"); }
else if (z==9) {
printf("\nThe correct answer was: %i", ez); }
}
printf("Game Over");
break;
case 2:
printf("\nPlease wait while we search for the maximum number.");
for (int i=0;i<=16;i++) {
printf("-"); Sleep(200); }
printf("\n");
ifstream x(data);
x >> ez;
x >> norm;
printf("The Maximum Number will be: %i", norm);
int right=rand() % norm;
x.close();
for (int z=life;z<=9;z++) {
printf("\nInput your guess: ";
scanf("%i", sjob);
if (sjob>=norm) {
printf("\nYou're higher than the number!!"); }
else if (sjob<=norm) {
printf("\nYou're lower than the number!!"); }
else if (sjob==norm) {
printf("\nYou're right!!"); }
else if (z==9) {
printf("\nThe correct answer was: %i", norm); }
}
printf("Game Over");
break;
case 3:
printf("\nPlease wait while we search for the maximum number.");
for (int i=0;i<=16;i++) {
printf("-"); Sleep(200); }
printf("\n");
ifstream x(data);
x >> ez;
x >> norm;
x >> complex;
printf("The Maximum Number will be: %i", complex);
int right=rand() % complex;
x.close();
for (int z=life;z<=9;z++) {
printf("\nInput your guess: ";
scanf("%i", sjob);
if (sjob>=complex) {
printf("\nYou're higher than the number!!"); }
else if (sjob<=complex) {
printf("\nYou're lower than the number!!"); }
else if (sjob==complex) {
printf("\nYou're right!!"); }
else if (z==9) {
printf("\nThe correct answer was: %i", complex); }
}
printf("Game Over");
break;
default: printf("\nSorry, couldn't understand that input. Bailing out.");
break; }
}
-----------------------------------------------------------------------------------