here is the simple code:
#include <allegro.h>
#include <iostream>
using namespace std;
int FindArea(int,int);
int main(){
int lenghtOfYard;
int widthOfYard;
int areaOfYard;
cout << "\nHow wide is your yard? ";
cin >> widthOfYard;
cout << "\nHow lond is your yard? ";
cin >> lenghtOfYard;
areaOfYard= FindArea(lenghtOfYard,widthOfYard);
cout << "\nYour yard is ";
cout << areaOfYard;
cout << " square feet.\n\n";
return 0;
}
int FindArea(int l,int w){
return l*w;
}
and it gives me this error:
[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
what am I doing wrong? I got this from a book on c++, but it is kinda outdated. :icon_neutral: