I dont completly follow. Basically a header file has function prototypes such as
// foo.h
int sum(int x, int y);
int difference(int x, int y);
the cpp file is the implimentation file
//foo.cpp
int sum(int x, int y)
{
return x+y;
}
int difference(int x, int y)
{
return x-y;
}
then in your project, if visual C++ would have
#include "foo.h" in the main
You can then do
#include "foo.h"
#include <iostream.h>
int main()
{
cout<<sum(7,8);
cout<<difference(19,5);
return 0;
}
If you get errors with this, then you are not comiling the cpp file. Follow what I said above to include the files in the project.
Matt