Quantcast
Viewing all articles
Browse latest Browse all 40524

Making classes in openframeworks in 2015 vs

I usually add a class but it is not recognized. Basically I'm using the newest build of open frameworks that works with visual studio 2015. This is my class

include "ofMain.h"

class ofClass
{
public:
float x;
void test();
};

include "ofClass.h"

void ofClass::test()
{
std::cout << "works";
};

ifndef OFCLASS

define OFCLASS

include "ofMain.h"

class ofApp : public ofBaseApp{

public:
	void setup();
	void update();
	void draw();

	void keyPressed(int key);
	void keyReleased(int key);
	void mouseMoved(int x, int y );
	void mouseDragged(int x, int y, int button);
	void mousePressed(int x, int y, int button);
	void mouseReleased(int x, int y, int button);
	void mouseEntered(int x, int y);
	void mouseExited(int x, int y);
	void windowResized(int w, int h);
	void dragEvent(ofDragInfo dragInfo);
	void gotMessage(ofMessage msg);

};

endif


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>