Hi, I'm trying to get this:
//C.h
#ifndef C_H
#define C_H
#include "c.h"
class C
{
public:
C();
int function(int, int);
};
#endif
which is defined in this:
//c.cpp
#include "c.h"
C::C()
{
}
int C::function(int a, int b)
{
return a * b;
}
to work in this:
//crp.cpp
#include <iostream>
#include "c.h"
void main(void)
{
C a;
std::cout << a.function(1, 2);
}
but I get two errors
Error: Unresolved external 'C::C()' referenced from C:\C++\CRP.OBJ
Error: Unresolved external 'C::function(int, int)' referenced from C:\C++\CRP.OBJ
I'm really stuck. Help v. much appreciated!
EDIT:
Thank you for your replies,
I'm using Borland C++ 5.5.1 for Win32, via the command line, I'm not actually sure what a linker is, this is the first time I've tried doing this.