Im new in c++.I cant figure out what i am doing wrong for hours.Any help would be important.The problem is when calling the constructor in main:
error LNK2019: unresolved external symbol "public: __thiscall imaging::Image::Image(void)" (??0Image@imaging@@QAE@XZ) referenced in function
//Image.h
#ifndef _IMAGE
#define _IMAGE
namespace imaging
{
class Image{
public:
unsigned int width,
height;
const unsigned int getWidth() const { return width; }
const unsigned int getHeight() const { return height; }
Image();
};
} //namespace imaging
#endif
//Image.cpp
#ifndef _IMAGE
#define _IMAGE
#include "Image.h"
namespace imaging
{
class Image{
public:
unsigned int width,
height;
const unsigned int getWidth() const { return width; }
const unsigned int getHeight() const { return height; }
Image::Image():width(0),height(0){
}
};
} //namespace imaging
#endif
#include "stdafx.h"
#include "Image.h"
using namespace imaging;
int main()
{
Image * image = new Image();
return 0;
}