Hello,
I have a namespace and a class inside this namespace like that,
namespace Var
{
public class myVar
{
public:
long num;
};
}
I want to use this class and the variable in every event. In order to do this, I am declaring the class at the beginning of my code like that,
...
using namespace System::Drawing;
using namespace Var;
Var::myVar deg;
Whenever I want to to use the variable of this class in an event, I can use it like that,
deg.num=5;
However, if I want to add deg.num to watch list, I cant see anything. It gives error like that,
deg.num error: 'deg.num' does not exist
Where is my mistake? If I declare my class inside of an event and want to see variable, everything is ok. I think problem is somewhere in declaration. Could you please help me?