Question: #include #include using namespace std; class RGB { public: unsigned int r,g,b; RGB(){ r = 0, g = 0, b = 0; } RGB(unsigned int

#include #include

using namespace std;

class RGB { public: unsigned int r,g,b; RGB(){ r = 0, g = 0, b = 0; } RGB(unsigned int red, unsigned int green, unsigned int blue){ r = red; g = green; b = blue; }

unsigned int getred(){ return r; } unsigned int getgreen(){ return g; } unsigned int getblue(){ return b; }

};

class Imageppm: public RGB { public: unsigned int h,w,pixmap; Imageppm(unsigned int height, unsigned int width) {

h = height; w = width;

pixmap = RGB[h]; for(unsigned int i = 0; i < w; i++){ pixmap[i] = RGB[w]; } } void writeppm(string filename){ ofstream out(filename.c_str()); out << "P3 " << endl; out << "Created by " << endl; out << h << " " << w << endl; out << 255 << endl; out << " " << endl; for(int i = 0; i < h; h++){ for(int k = 0; k < w; k++){

} } }

};

int main() {

return 0; }

****************help c++ LINE 42 EXPECT PRIMARY EXPRESS BEFORE 44 INVALID TYPE UNSIGNED INT FOR ARRAY SUBSCRIP THANKS

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!