Image.h
#include <iostream>
#include "Array.h"
using namespace math;
namespace imaging
{
class Image: public Array
{
public:
Image();
};
}
Array.h
namespace math
{
template <typename T>
class Array
{
protected:
T * buffer;
unsigned int width, height;
public:
Array(unsigned int w, unsigned int h);
};
}
and Array.cpp
#include <iostream>
using namespace std;
namespace math
{
Array::Array(unsigned int w, unsigned int h)
{
this->width = w;
this->height = h;
}
}
I have these errors:
Image.h:12:2: error: expected class-name before {
token
{
^
In file included from Image.cpp:1:0:
Image.h:12:2: error: expected class-name before {
token
{
^
Array.cpp:8:2: error: invalid use of template-name math::Array
without an argument list
Array::Array(unsigned int w, unsigned int h)
Any help for this??? Thnx