Hi,
I am new to C++, and I'm having trouble segmenting my code. Here is my setup:
- A main.cpp that calls function that takes 2 int and 1 char* and returns int
A function.h that contains, among other things, a function prototpye
int function(int a, int b, char* c);
A function.cpp that contains the actual function definition.
I have used #include "function.h" in both function.cpp and main.cpp.
When I try to compile my code, I get that there is an undefined reference to function(int, int, char*) in my main() function.
What's wrong?
*smacks head.
I left off a .cpp after the function file, so eclipse wasn't compiling that file. sorry!