I am a beginner so this problem might seem trivial to you. So I have the following files:
- base.h
- derived.h
- base.cpp
- derived.cpp
- TestCpp.cpp
base.h
#include <iostream>
namespace App
{
class Base
{
public:
virtual void Print();
};
}
base.cpp
#include "base.h"
namespace App
{
}
derived.h
#include "base.h"
class Derived : public App::Base
{
public:
void Print();
};
derived.cpp
#include "derived.h"
void Derived::Print()
{
std::cout << "This works!! form Derived class\n";
}
and at last TestCpp.cpp
#include "derived.h"
int main()
{
std::cout << "Hello World!\n";
Derived d;
d.Print();
return 0;
}
I am getting the following Linker error:
I don't know what it is I am doing wrong. Please help me out.