I am trying to solve a lesson in my study. I am going to have an abstract class, CFigure, on top and different figures below, currently I have made a circle class. I am going to call this from a C# program.
But when I try to build my code I get the following error messages:
- unresolved token (06000001) arealBeregnerCPP.CFigure::area
- unresolved token (06000002) arealBeregnerCPP.CFigure::circumference
- 2 unresolved externals
I hope anyone can give me a hint in what I do wrong... Thanks!
This is my program:
// arealBeregnerCPP.h
#pragma once
using namespace System;
namespace arealBeregnerCPP {
public ref class CFigure
{
public:
virtual double area();
virtual double circumference();
};
public ref class CCircle : public CFigure
{
private:
double m_radius;
public:
CCircle(double radius)
{
m_radius = radius;
}
virtual double area() override
{
return 0; //not implementet
}
virtual double circumference() override
{
return 0; //not implementet
}
};
}