Hi,
Well, I'm still a newbie to C++, so excuse my maybe (probably???) stupid
question...btw, I use gcc 2.95.2.
Here are my (test) funtions:
mainfunc.cpp:
#include <iostream>
#include "func1.h" //so it looks in the same dir, right?
int main(){
int a=42;
func1(a); }
func1.cpp:
#include <iostream>
#include "func1.h" /* I read you should also include it here... */
void func1(int i) {
cout << i << endl; }
func1.h:
void func1(int i);
My Problem is that when I try to compile it, it gives me an "undefined
reference to 'func1(int)' error and I don't know how to get rid of it. I
tried to put the files everywhere, like in the "include"-folder or others
folders that I set with path.
What is my mistake??? Thank you in advance, I really appreciate it!
Regards
Markus