MinGW, std::bad_cast, "expected type-specifier"

I have just swapped from Visual Studio to Code::Blocks as SFML 2.0 was throwing unhandled exception after unhandled exception at me when I used Visual Studio.

However, in Code::Blocks I have some other strange issues. I have included the header <exception>, but:
1) I can't use the class runtime_exception - it doesn't seem to be in the header
2) std::bad_cast shows up on the Smartsense code prediction list, but when I compile, it gives me the error in the post header (expected type-specifier), so it would seem that the compiler doesn't know what std::bad_cast is either.

Does anyone have any ideas?
1) There is no runtime_exception. You probably meant runtime_error, which is in <stdexcept> (not <exception>)

2) bad_cast is in <typeinfo> (not <exception>)

http://cplusplus.com/reference/std/typeinfo/
http://cplusplus.com/reference/std/stdexcept/
http://cplusplus.com/reference/std/exception/
Yes I did mean runtime_error. And thank you so much - I guess I should have been able to find that myself :/

(It always worked in VC just including <exception>; I guess MS must have done something to their header...)
Topic archived. No new replies allowed.