cosmicsafari
New Member
- Messages
- 10
- Reaction score
- 0
- Points
- 0
Hey guyz, im quite new to C++ and i keep getting this problem,
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
As far as i am aware it has something to do with a: An undefined external symbol (symbol) was found in function. To resolve this error, provide a definition for symbol or remove the code that references it.
CODE----------------------------------------------
#include "LinkedList.h" //import header file
#include <ctime> //for time()
#include <time.h>
#include <cstdlib> //library for srand() and rand()
#include <conio.h> //for getch();
int main(){
LinkedList Munro_List; //create linked list called Munro_List
//create 40 munros and populate each detail of the munro randomly
for (int ID=1 ; ID<=40 ; ID++)
{
Munro_List.generateHills (
//ID, //Hill ID value
(rand() % 1400) + 3000, //Hill height randomly generated
(rand() % 280) + 20, //Hill distance from home randomly generated
false, //Previously climbed value set to false i.e not climbed
(rand() % 280) + 20,
(rand() % 100000) + 400000); //Grid reference of hill randomly generated
}
return 0;
}
CODE END---------------------------------------
Im stumped, any help would greatly be appreciated =D
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
As far as i am aware it has something to do with a: An undefined external symbol (symbol) was found in function. To resolve this error, provide a definition for symbol or remove the code that references it.
CODE----------------------------------------------
#include "LinkedList.h" //import header file
#include <ctime> //for time()
#include <time.h>
#include <cstdlib> //library for srand() and rand()
#include <conio.h> //for getch();
int main(){
LinkedList Munro_List; //create linked list called Munro_List
//create 40 munros and populate each detail of the munro randomly
for (int ID=1 ; ID<=40 ; ID++)
{
Munro_List.generateHills (
//ID, //Hill ID value
(rand() % 1400) + 3000, //Hill height randomly generated
(rand() % 280) + 20, //Hill distance from home randomly generated
false, //Previously climbed value set to false i.e not climbed
(rand() % 280) + 20,
(rand() % 100000) + 400000); //Grid reference of hill randomly generated
}
return 0;
}
CODE END---------------------------------------
Im stumped, any help would greatly be appreciated =D