not initialized

As seen in the image below I am initialising a variable for a class
http://puu.sh/uOv5E/7f5ce0e517.PNG

Yet when I run my program visual studio tells me I have not initialised the variable.
http://puu.sh/uOuRX/7e19796e6c.png

Even thought it tells me I have not initialised it I can still use it.

Okay I just fixed it, it seems, but is this really correct, do we have to create a
a new to use pointers?.
http://puu.sh/uOvjF/18957525ae.png

Also now my program corrupts at the end of running.

Thanks for any knowledge because I am horrible at researching!
Last edited on
just paste the code next time.

Without knowing the class, assuming everything is set up to go, yes a new statement to allocate the object should be correct.

you can also just make a class object without pointers.

classname foo;
foo.function();

yes but without pointers cause issues
What kind of issues?
OP: if you want direct answers its better to give full information straight off rather than waste yours and everyone else's time with such
Sorry gunnerfunner :(
Topic archived. No new replies allowed.