Unhandled Exception: char at memory location [ ]

Hi

I'm trying to debug my program and I get a "Unhandled Exception: char at memory location [ ]". The compiler points me to the source code:

1
2
if (Time1_ < 0)
		throw("start time has to be greater than 0");


Except this doesn't make sense as Time1_ is zero.

I then comment out this throw, then the program just crashes with the same unhandled exception. The compiler just points me to the next throw in the source code:

1
2
if (Time2_ > Parameters.back().first)
		throw("end time has to less or equal to last time");


Again this doesn't make sense as Time2_ is less than the Parameters value. So I comment out this throw as well to see what's going on.

So then the program crashes and points me to the next bit of code:
1
2
unsigned long StartTimeIndex, EndTimeIndex;
bool TimeInd = false; // <=== 


StartTimeIndex and EndTimeIndex are created successfully but there's a problem with TimeInd (same unhandled exception).

Is there someone who can explain what a "Unhandled Exception: char at memory location [ ]" is and what causes it?

Many thanks
That sounds like the heap and/or stack is corrupt. This is usually due to writing beyond the bounds of certain memory or using an uninitialized [pointer]
ah thank you, found it!
Topic archived. No new replies allowed.