I'm creating an image manipulation program and created two classes, pixel and image. The pixel class works fine and I can do everything with it, from inversing the colors to brightening to greyscale. I wanted to have an image class that uses the pixel class instead of being in the main cpp file. I get however the error "error LNK2019: unresolved external symbol "public: __thiscall pixel::pixel(void)" (??0pixel@@QAE@XZ) referenced in function "public: __thiscall image::image(void)" (??0image@@QAE@XZ)"
Image header file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include "pixel.h"
#ifndef IMAGE_H
#define IMAGE_H
class image
{
public:
//constructors
image();
image(int,int);
//Member functions
///Accessors
int getpixel(int);
private:
int width;
int height;
pixel* contents;
};
#endif