Nixon
#1
Hi folks, i want to get a class static, because i don’t need objects of it. All works pretty well but when i use
ofxXmlSettings XML;
in the header file i get problems. Is there any way to use the XML object (or objects in general) in a static class?
http://stackoverflow.com/questions/743203/accessing-static-class-variables-in-c should help answer your question about the why of this. The short answer is:
h
class testApp : public ofBaseApp{
public:
void setup();
static ofPixels p2;
};
cpp
ofPixels testApp::p2;
void testApp::setup(){
p2.allocate(640, 480, 1);
}
Nixon
#3
Thanks Joshua. And thanks for programming interactivity, helps me with my bachelor project.
cya