Tuesday, July 28, 2009

A Turbo C++ 3.0 bug?

Open the Turbo C++ v3.0 and in the body of main() function if we give a statement like :





for ( ; 0 ; )


{


..........cout %26lt;%26lt; "Exec"; // dots mean space


}





The loop gets executed ONCE??? But that is not supposed to happen. Wth is happeneing here?

A Turbo C++ 3.0 bug?
This is probably a bug, or at the very least non-standard behavior. It certainly doesn't do this in modern C++ compilers.





From what I remember, Turbo C++ wasn't fully ANSI C complient, so it could be a "feature" of that specific compiler.
Reply:its not bug
Reply:This is not a bug and dont use turbo as it is very old use CODE BLOCK as it is open source and perfect for begineers


No comments:

Post a Comment