@ofgenvvk wrote:
Hi there,
Can anyone help me and explain how to encapsulate classes one into another?
For example, I have three bespoke classes: ofTeam, ofPerson, ofConnection.
ofApp.h:
/#include "ofMain.h"
/#include "ofTeam.h"ofTeam.h:
/#pragma one
/#include "ofMain.h"
/#include "ofPerson.h"
/#include "ofConnection.h"class ofTeam{
public:
...
vector persons;
vector connections;}
ofPerson.h:
/#pragma one
/#include "ofMain.h"
/#include "ofTeam.h"
/#include "ofConnection.h"class ofPerson{
public:
...
vector connections;}
everything by this point works well, but then I am trying to expands ofConnection lile:
ofConnection.h:
/#pragma one
/#include "ofMain.h"
/#include "ofTeam.h"
/#include "ofPerson.h"class Person{
public:
void init(ofNode b, ofPerson b_);_
...ofPerson a;
}it returns that "Unknown type ofPerson" in both cases (highlighted with italic)
What I am doing wrong?
Posts: 1
Participants: 1