Trying another small program, learning still and it wont work.
Code:
typedef unsigned short USHORT;
#include <iostream>
using namespace std;
USHORT FindArea(USHORT Length, USHORT Width); //Function prototype
int main()
{
USHORT LengthOfYard;
USHORT WidthOfYard;
USHORT AreaOfYard;
cout << "\nHow wide is the yard? ";
cin >> WidthOfYard;
cout << "\nHow long is the yard? ";
cin >> LengthOfYard;
AreaOfYard= FindArea(LengthOfYard,WidthOfYard);
cout << "\nYour Yard is ";
cout << AreaOfYard;
cout << " Square feet\n\n";
system("PAUSE");
return 0;
}
and the error is
Code:
------ Build started: Project: function prototypes, Configuration: Debug Win32 ------
Compiling...
function prototypes.cpp
Linking...
function prototypes.obj : error LNK2019: unresolved external symbol "unsigned short __cdecl FindArea(unsigned short,unsigned short)" (?FindArea@@YAGGG@Z) referenced in function _main
C:\Documents and Settings\Reece.LAPTOP\My Documents\Visual Studio 2005\Projects\function prototypes\Debug\function prototypes.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Reece.LAPTOP\My Documents\Visual Studio 2005\Projects\function prototypes\function prototypes\Debug\BuildLog.htm"
function prototypes - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
could someone please help me. i cannot find anything wrong with it. :-/