I have a class with several instances. I also have a global function. I want to access a variable in my class. However, I get an Error that I'm not able to access a nonstatic reference from a static object. Is there a work-around for this?
In one file I would have something like this:
Public class A{
public: int angle;
}
In another file I would maybe have something like this:
#include "A.h"
void changeAngle()
{
A.angle = 5;
}