Today I reviewed type casting on C++ language. There is a strange phenomenon. According to
the articles on type casting, the "dynamic_cast()" can be downcasting. But I implement a example
to test downcasting by "dynamic_cast()". There is a warning on appending a flag "/GR-" into
the compiler command in Visual C++ 6.0. After appending the flag, I recompiled my example source
again. OK. No error, no warning. Everything looks right. Run it.
A fatal error poped up. My god! What happened! I don't know where is wrong. Is there the
mistake in the articles, or is there a hiddening bug in Visual C++?
毎日わたしは自転車で会社へ行きます。 わたしの祖母の家から会社まで三十分 かかります。 わたしは午前七時に おきます。 わたしの会社は午前
九時にはじまります。 わたしの会社は午後五時に終わります。 わたしは午前九時から午後五時まで働きます。 日曜日から金曜日まで働きます。
本文探讨了使用C++中dynamic_cast进行向下转型时遇到的问题。作者在Visual C++ 6.0环境下尝试实现一个测试案例,并在编译指令中加入/GR-标志后遇到了运行时错误。文章详细记录了实验过程及遇到的具体问题。
1335

被折叠的 条评论
为什么被折叠?



