Hello there. This is obviously my first post on DaniWeb, as I just found the site in searching for a solution to my issue. I've read over the site rules, as well as the forum rules regarding homework help.
Let me start out by saying I am not looking for an easy solution, or some one to do my work. I'm simply trying to figure out why I can't get this darn thing to compile =)
I'm using Visual C++ 2005 Express Edition, and have pretty much just started coding an end-of-chapter lab assignment.
The issue I'm running into has to do with passing an array of my pre-defined struct into another function. The following is my code.
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
struct menuItemType
{
string menuItem;
double menuPrice;
};
void getData(menuItemType menu[]);
void showMenu(menuItemType menu[]);
void printCheck(menuItemType menu[]);
int main()
{
menuItemType menu[8];
getData(menu);
return 0;
}
The errors that I am receiving are:
1>Compiling...
1>Breakfast.cpp
1>Linking...
1>Breakfast.obj : error LNK2001: unresolved external symbol "void __cdecl getData(struct menuItemType * const)" (?getData@@YAXQAUmenuItemType@@@Z)
1>C:\Documents and Settings\Luwigie\My Documents\Visual Studio 2005\Projects\Breakfast\Debug\Breakfast.exe : fatal error LNK1120: 1 unresolved externals
Again, this is in the early construction phase, and I don't seem to be having a compiler error... The error seems to come at the linking stage.
Any help would be greatly appreciated. Also, this looks like an excellent site and source of information =) Glad I stumbled upon it.