Functions - Probably a really dumb question...
Hi,
I'm new to C++, and ive been trying to get a function to work that is in a seperate .cpp file to the main function. I keep getting an error:
Main.obj : error LNK2001: unresolved external symbol "long __cdecl vercin(long,long,char * const,char * const)" (?vercin@@YAJJJQAD0@Z)
how do get it to work? The function is empty at the moment, and so all i have is this:
CPP1.cpp:
PHP Code:
int main()
{
\\...
long vercin (long , long , char [] , char []);
long a = 1;
long b = 2;
long c = 0;
char c [] = "A";
char d [] = "B";
\\...
c = vercin ( a , b , c , d );
\\...
}
CPP2.cpp:
PHP Code:
long vercin (long minval, long maxval , char firstmessage, char secondmessage)
{
return 0;
}
Sorry if this is a really dumb question, but i cant seem to find anything on it:( Do you have to make it a public or something like in VB? or does it not work like that:o
Thanx for any help:)