Access violation writing location 0xabababab.

nothingasis

In Runtime
Messages
198
Location
CA
Getting a access violation. I'm looking at the pointers but I can't seem to find the problem. Can someone give me a hint besides the pointers? I've looked at the call stack but I'm fairly new to this so I'm still not seeing anything pointing me to where I need to be.

Please and thank you as always!

The main is attached as a txt

[EDIT]

Okay got it, the array size was bad. I got confused with sizing.
Changed

candyBarPtr = new CandyBar[1]

to

candyBarPtr = new CandyBar[2]
 

Attachments

  • main.txt
    4.5 KB · Views: 1
Last edited:
Back
Top Bottom