Bloosy
Technical User
- Jun 23, 2003
- 15
I've got a class Supplier and in main program I have declared an array:
then I filled it with ten objects.
Now I need to call a supMask() function from the other file, mask.cpp, where I defined it like this:
and call it from main like this:
It compiles ok, but I get link error:
error LNK2001: unresolved external symbol "void __cdecl supMask(class Supplier *)
What am I doing wrong here?
Code:
Supplier* suppliers[10];
Now I need to call a supMask() function from the other file, mask.cpp, where I defined it like this:
Code:
void supMask(Supplier* suppliers[]) {
for(int i=0; i<10;i++) {
cout<<suppliers[i]->getName()<<endl;
}
}
Code:
supMask(suppliers[10]);
It compiles ok, but I get link error:
error LNK2001: unresolved external symbol "void __cdecl supMask(class Supplier *)
What am I doing wrong here?