TurboC 7 v/s Code::Blocks
#1

In my school our teacher uses TurboC 7 for us to write programs in. I personally have Code::Blocks.
Now, TurboC 7 would give an error for "use namespace std;". So what's up with that?

P.S. - I searched on ****** but I couldn't find any relevant information for TurboC 7.
P.S. 2 - I know this is not a C++ forum, but I don't want to register everywhere now, and this forums has some scripters/programmers so yeah.
Reply
#2

Well in C++ every program must have namespace std; included. You don't want to not include it, do you?

I found some information about turboc program in ******.
Reply
#3

If you want a decent IDE you should use Visual Studio or Netbeans. Personally I hate Code::Blocks (mainly because of the way it does auto formatting).
Reply
#4

Quote:

The use of namespace std for all identifiers of the C++ standard library was introduced during the standardization process. This change is not backward compatible to old header files, in which identifiers of the C++ standard library are declared in the global scope. In addition, some interfaces of classes changed during the standardization process (however, the goal was to stay backward compatible if possible). So, a new style for the names of standard header files was introduced. This allows vendors to stay backward compatible by providing the old header files.

The definition of new names for the standard header files was a good opportunity to standardize the extensions of header files. Previously, several extensions for header files were used; for example, .h, .hpp, and .hxx. However, the new standard extension for header files might be a surprise: Standard headers no longer have extensions. Hence, include statements for standard header files look like this:

Source: http://my.safaribooksonline.com/0201...portal=oreilly
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)