G
Guest
I have an application form named Form1.h. The code for this form is a
namespace (MyNamespace) with two classes in it (Form1 and MyClass). Form1 has
windows designer code and some button event handlers. In those event handlers
I want to reference methods in the MyClass class. I use syntax like this:
double F = MyClass::MyMethod(x,y);
As soon as I type the second colon I get a full list of all the exposed
methods in MyClass and I sense I going the right way. But, I debug and get
two errors:
1) MyClass is not a class or namespace name
2) MyMethod identifier not found
I am not sure why this happens but I sense its because I need an instance of
MyClass to work with in the class Form1. In VB I create an instance of a
class with the new keywork e.g. MyInstance=new MyClass. How is this done in
C++?
namespace (MyNamespace) with two classes in it (Form1 and MyClass). Form1 has
windows designer code and some button event handlers. In those event handlers
I want to reference methods in the MyClass class. I use syntax like this:
double F = MyClass::MyMethod(x,y);
As soon as I type the second colon I get a full list of all the exposed
methods in MyClass and I sense I going the right way. But, I debug and get
two errors:
1) MyClass is not a class or namespace name
2) MyMethod identifier not found
I am not sure why this happens but I sense its because I need an instance of
MyClass to work with in the class Form1. In VB I create an instance of a
class with the new keywork e.g. MyInstance=new MyClass. How is this done in
C++?