So I wrote this program about candy bars and it compiles but displays nothing, no error messages. Yes, I'm new to C++ but I think I wrote this program correctly. But maybe not........Any suggestions?
You are accessing snack[3], which is out of bounds of the array. You allocated only three elements, not four.
Damn, that was the dumbest thing I've ever done................thank you very much you are a God to me, I missed it like a hundred times. Staring at this code so damn long I guess I over looked the simple...........