在我的图像类中,我希望在将像素传递给Image之后更改它们,并且它们应该仍然会更改图片。
int main(int argc, char* argv[]){
Image theImage(4, 8);//width/height
Pixel aPixel(2,1);
Pixel* p = &aPixel;
theImage.setPixel(p);
aPixel.setBlue(100);//change the blue (RGB) value of the pixel, but Pixel color doesnt change
theImage.sa