Newbie: Undeclared Identifier
-
I'm still a rookie, so forgive me if this is simple. I have a form and in the form's .h file i have the form's regular class stuff, but I have also added another class. For example: in my .h file i have something like this: namespace MyNamespace { public __gc class Form1 : public System::Windows::Forms::Form { //then i have all of the regular form stuff //I also have an event handler that is //like this: private: System::Void axTws1_tickPrice(System::Object * sender, AxInterop::TWSLib::_DTwsEvents_tickPriceEvent * e) { //when this event happens I want to create an //instance of another class that I have defined //within this same .h file, which you can see //below. //now when i try to do the following, i get an //error message that states that //"SymbolObject_Constructor" is an undeclared //identifier: SymbolObject_Constructor *tempObject = new SymbolObject_Constructor; }//end of event handler };//end of form class public __gc class SymbolObject_Constructor { public: String *Stock_Ticker; Decimal Bid; Decimal Ask; public: SymbolObject_Constructor() { Stock_Ticker = S""; Bid = 0.0; Ask = 0.0; } };//end of SymbolObject class }//end of namespace in my .cpp file for this form, i have a void method that creates an instance of the SymbolObject class, and I do it the same way as I attempted in the .h file; but in the .cpp file, I don't get the error message. Can anyone see what I am doing wrong? Thanks, Jody Blau
-
I'm still a rookie, so forgive me if this is simple. I have a form and in the form's .h file i have the form's regular class stuff, but I have also added another class. For example: in my .h file i have something like this: namespace MyNamespace { public __gc class Form1 : public System::Windows::Forms::Form { //then i have all of the regular form stuff //I also have an event handler that is //like this: private: System::Void axTws1_tickPrice(System::Object * sender, AxInterop::TWSLib::_DTwsEvents_tickPriceEvent * e) { //when this event happens I want to create an //instance of another class that I have defined //within this same .h file, which you can see //below. //now when i try to do the following, i get an //error message that states that //"SymbolObject_Constructor" is an undeclared //identifier: SymbolObject_Constructor *tempObject = new SymbolObject_Constructor; }//end of event handler };//end of form class public __gc class SymbolObject_Constructor { public: String *Stock_Ticker; Decimal Bid; Decimal Ask; public: SymbolObject_Constructor() { Stock_Ticker = S""; Bid = 0.0; Ask = 0.0; } };//end of SymbolObject class }//end of namespace in my .cpp file for this form, i have a void method that creates an instance of the SymbolObject class, and I do it the same way as I attempted in the .h file; but in the .cpp file, I don't get the error message. Can anyone see what I am doing wrong? Thanks, Jody Blau