|
-
July 20th, 2010, 08:34 AM
#1
constructor being ignored in visual studio 2010
I'm not used to using VS and when I realized my constructor was being ignored, you can understand why I would be confused
example:
VTXMENU::VTXMENU()
{
Submenu = NULL;
Next = NULL;
Previous = NULL;
Parent = NULL;
Base = NULL;
ItemType = 0;
ItemName[0] = 0; // (these two are character-array strings)
Command[0] = 0; //
cout<< "created\n";
}
and I'm creating one dynamically via:
VTXMENU *fish;
fish = new VTXMENU;
not only do my strings end up full of garbage, but the message "created" is never displayed
Why is this happening?
thx
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|