I hate vague errors where I don't even know where to start looking for an error. Error happens immediately and it says "Unhandled exception at 0x5981c9c7 (msvcr100d.dll) in experiment.exe: 0xC0000005: Access violation reading location 0xabababab."
Does any one have any clue on why this screwed up?
LIne 31 goes past the end of the array. This is the idiom to use:
for(int i=0; i < total_options; i++)
A big help to you would be to learn to use a debugger. You can watch your variables change value as you step through your code 1 line at a time, to see where it all goes wrong & deduce why.
With the error message: "Access violation reading location", means you are accessing memory you shouldn't, & array over run is a classic mistake.
If you can get hold of a clang compiler - it apparently has really nice messages. Just check whether your IDE can use it.