Hey I'm having trouble with compiling this code, I keep getting a "undefined refernce to winmain@16
I feel like it has to do with int main() I tried just main(), im not sure how to fix that
#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include "HangmanBoard.h"
#include "FileProcessor.h"
using namespace std;
class Hangman{
int main(){
int right;
bool isGuesser = false;
bool isOpp = false;
string gotWord;
int wordSize;
char input;
string libraryLocation;
char* guesser;
char* opp;
char guessedLetter [80];
int wrong = 0;
int gcount = 0;
char* words[1000];
int wrdcnt;
bool gameover = false;
intro();
printf("Enter Library");
cin >> libraryLocation;
//scanf("%s", libraryLocation);
openWordFile(libraryLocation);
printf("Enter the word from the word bank");
cin >> libraryLocation;
//scanf("%s",gotWord);
printf("Who is the guesser?");
scanf(guesser);
if(guesser[0] == 'h'){
isGuesser = true;
}
else {
isGuesser = false;
}
wordSize = gotWord.size();
char* arrayWord = new char [wordSize];
for(int i=0; i < sizeof(arrayWord); i++){
arrayWord[i] = gotWord[i];
}
bool cover [wordSize];
for(int i = 0; i < sizeof(cover);i++){
cover[i] = false;
}
char* pguess = new char [wordSize + 6];
while(isGuesser == true){
while(gameover == false)
{
printf("Please enter the letter that you would like");
while(1){
fflush(stdin);
scanf("%c",&input);
if(!(isalpha(input))){
cout<< "Invalid entry please re-enter";
continue;
}
}//end while(1)
right = 0;;
gcount++;
pguess[gcount] = input;
for(int i = 0; i < wordSize; i++){
if(arrayWord[i]==input){
right++;
cover[i] = true;
}
}
if(right == 0){
wrong++;
}
image(wrong);
display(cover, arrayWord);
pastguess(pguess);
if(right == 0){
cout << "Sorry try again";
}
else{
cout << "Good guess";
}
gameover = checkWin(cover);
if (checkWin(cover) == true){
cout<< "Congrats,guesser won";
}
gameover = checkLoss(wrong);
if (checkLoss(wrong) == true){
cout << "Guess Losses";
}
}//end gameover whi8le
}//end guesser while
}//end main
};
//end class;