const char szTmp[] = "Test 2";
strcpy((char*)szTemp, "Test");
I''m not doing any memory overwriting in my project. I just wrote the above code from scratch, to show my problem and made a little mistake.
I also made an exact copy of your code and it gives me the same error again in the first case (I don''t get the message "Inside catch"). In the second case everything works fine (as expected) because szTemp isn''t a const char anymore - that''s clear.
So it looks like the exception handling doesn''t work, right? And it''s not the same behaviour you have, Enigma, because I can''t write to a const if I compile my code.
I''m using Bloodshed''s Dev-C++ on a Windows XP Intel compatible machine. Maybe I have to set a compiler flag, to enable exception handling (but it shouldn''t be disabled by default, right?). What compilers do you use?
Very strange
