Original Post
well this just makes no sense ... here is part of the code: the error is ... type CGUI is not a base type for type CGUI::XDialogue if i change this &CGUI::glFonts[fontIndex] to just &glFonts[fontIndex] (which im pretty sure it shoudnt be), i get this error: CGUI::glFonts is not a member of CGUI::XText ... that doesnt make sense since it says CGUI::glFonts therefor the compiler knoes that variables scope ... but why it givng me an error in the first example with CGUI::glFonts[fontIndex] ? i looked on msdn and foind an example of neste classes to make sure i was doing it correctly and i found no difference in what i was doing and what their example was. should i just inlike the render function? whats going on here?
class CGUI: {
private:
std::vector < GLuint > glFonts;
// ...
class XText {
private:
int x, y;
Color color;
uint fontIndex;
std::string text;
public:
void render();
// ...
};
// ...
public:
// ...
};
void CGUI::XText::render() {
drawText(x, y, &CGUI::glFonts[fontIndex], color, text);
}