I have been trying to get the function pixelData() in class background below to work but to no avail. Could someone let me know how to go about implementing it? I am not allowed to touch the main(). Just the class Background. Thanks!
it looks like 'd' should be a vector/array of bytes, not just 1 single byte. you take its address, its a single character, and then you try to treat it like an array, which probably crashes.
Ok, if this is the case, I should treat 'd' as a vector/array of bytes? Meaning that I would need to implement the pixel function with a vector/array? And the data member 'd' should then become 'd[]' in my class background?
Hi, I'm not sure if I am attempting it correctly, but is this how its done. Should not be since I am getting a compilation error from this. Would appreciate if anyone could correct me on this. Thanks.