I've run into a little problem to which i'd like some help:
I have a vector of struct rgba, which just contains POD (4 unsigned bytes).
A class of mine has a reference to this, which must obviously be initialized in an initializer list:
class image
{
private: std::vector< rgba > & img_data;
public image(std::vector< rgba > & _data) : img_data(_data) {}
};
But I'm not allowed to do that, and I just left my compiler and i cannot remember the error. :-S
How can i use my reference (i love references) while initializing it properly on the creation of image?
I read something about overloading assignment or copy operators,
but is that possible when T is a struct, and how do i do that?
Thanks a bunch in advance, I've been sleepless for two days because of this. ;-/