// game test number 1
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <stdio.h>
#include <string.h>
usingnamespace std;
int dialouge1(){
cout << "You have been assigned by the Lord of Uberdark to patrol the Mines of Rodin. While patroling you run into a goblin!";}
int Fight1(){
int d10 ;
int ML1 ;
int rr ;
char myArray[50];
cout << " What do you want to do, run or fight the goblin? ";
cin.getline( myArray, 50, '\n');
if( !strcmp( myArray, "fight")){
srand(time(0));
d10 = rand() % 10+1;
cout << d10;
ML1 = rand() % 10+1;
cout << ML1;
if(d10 > ML1){
cout << " You defeated the goblin!" << endl << endl;}
if(d10 < ML1){
cout << " You have been defeated by the goblin! You retreat back to Uberdark to rest." << endl << endl;}
if(d10 == ML1){
cout << " You and the goblin have both been defeated by entropy!\n\n";
}
if(d10 == ML1){
cout << " You get back up and rest for a while to then continue your task.";}
if(d10 < ML1){
cout << " You return from Uberdark well rested.";}
}
if( !strcmp( myArray, "run")){
srand(time(0));
rr = rand() % 14+1;
if(rr > 7){
cout << " You have successfully ran away, coward!";}
if(rr < 7){
cout << " The goblin has caught up to you and beat you to the floor. You wake up later and continue to patrol.";}
}
system("pause");
}
First, your problem (as maeriden said) is that you are not defining a main() (or WinMain()) function for your program. This means that your linker does not know where the main entry point for the program is.
Another little thing, (though it might not be an error) is that if you declare a function as an int your program expects it to return an interger. For things like dialouge1(), you should probably define it is a void function. The same goes for your Fight1().
Also, WinMain belongs in a windows application. An ordinary console application has main. Most likely the wrong project type was selected at the start. I'd suggest starting a fresh project and choosing "console" as the project type.