×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Borland C++ vs Standard C++

Borland C++ vs Standard C++

Borland C++ vs Standard C++

(OP)
Hi guys, what is the difference bewteen Borland C++ and Standard C++? I am currently learning how to program C++ reading a book called Standard C++. However i cannot go beyond the first page of the book cause the following code below will not run.

 #include <iostream>

   int main()
   { int i =10, j=20;
       int k = (i+j)/2;
      std::cout << "i is " <<i
                   << " and j is " << j << std::endl;
      std::cout << "average is " << k
                   << std::endl;
      return 0;
   }

the error msg is "Qualifier 'std' is not a class or namespace name." I do know that standard C++ is a standard language that is not owned by any of the major compiler developers. Does that mean that Borland C++ 5.02 cannot support the std::cout functions? Shouldn't such compilers support Standard C++? Why is there such differences? makes learning C++ so difficult for a newbie like me.:(

Also wat is the difference between Borland C++ 5.02 and Borland Turbo C++ 4.5? Why is one called Turbo C++ and the other is not? Will Turbo C++ 4.5 support std::cout?

Lastly, is it possible to program plain old C programs using a C++ compiler? how do i do that and if C++ is a superset of C then y shld pple learn C anymore?

Sorry for so many questions and it would be great if somone could help me with these questions.

Thanks,

John

RE: Borland C++ vs Standard C++

after #include put
using namespace std;

John Fill


ivfmd@mail.md

RE: Borland C++ vs Standard C++

Does that mean that Borland C++ 5.02 cannot support the std::cout functions? Shouldn't such compilers support Standard C++? Why is there such differences? makes learning C++ so difficult for a newbie like me. At the time 5.02 was written, it did support the "standard." That was several years ago. At the time, the C++ committee was working revising the standard. The committee "froze" that standard in 1998 (I think). Any compiler released before that time isn't fully compliant. See my comments on your other thread. Unless you need a compiler for DOS, I would suggest you upgrade to 5.5. It's free and much more compliant than 5.02.

One note: 5.5 is the same compiler in Borland C++ Builder 5 but 5.5 does not come with the RAD (rapid application developement) IDE that Builder has.

Also wat is the difference between Borland C++ 5.02 and Borland Turbo C++ 4.5? Why is one called Turbo C++ and the other is not? Will Turbo C++ 4.5 support  std::cout? The "Turbo" compilers are (for the most part) even older that the "Borland" compiler. I believe they were called "Turbo" because Borland had a full line of very fast (turbo) compilers. They also came out with the "Borland" compilers for "professionals". Somewhere around WFW or 95, Borland dropped the "Turbo" name. You can get more information by going to http://community.borland.com/museum .

Lastly, is it possible to program plain old C programs using a C++ compiler? how do i do that ... Most C++ compilers are C compliant. Some compilers look at the extention on the program source code (.c vs .cpp) to determine whether to compile in C or C++. Others have switches when you compile it. I don't remember how 5.02 did it.

... if C++ is a superset of C then y shld pple learn C anymore? That question is likely to start a religious war. There is still a lot of older C code out there. The C committee is also working on updating its standard, too, so C won't go away soon. There are a lot of people out there who say that newbies should stick to C++ and not learn C and there are a lot out there who say they should. This is a question that most likely cannot be answered by anyone but you.

James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.

RE: Borland C++ vs Standard C++

(OP)
Thank you all very much for taking the time to explain and answer my questions. Particularly to James, sorry that you had to type so much but it really helped a great deal. :)

Thanks once again.

John

RE: Borland C++ vs Standard C++

That's why we are here.

James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.

RE: Borland C++ vs Standard C++

hi there,

BC++ 5.02 has a very powerful compiler n IDE. if u want to compile above code change ur node type to CppCompile n extension to *.cpp n all'll be right then.

Borland C++ is some what enhanced n proprietry compiler then standard C++. it fully support standard library functions as well as its own functions that r not part of standard library.

Turbo series is some what old compilers of borland then "Borland series " compilers.

n ur last question..... yes u can compile 16bit n 32bit apps using borland c++ 5.02 compiler easily. just change node types n some project properties n u got compiled app for ur required plateform. u can use bc++ 5.02 to compile to c or cpp. its very user friendly. but try using bc++ 5.5 compiler. its without IDE but its more enhanced n powerful then bc++ 5.02. bc++5.5 is basically bc++ builder compiler, an RAD tool from borland.

hope that this small chunk of material has been satisfied u to some extent.

ComputerJin

RE: Borland C++ vs Standard C++

#include <iostream.h> Let's u compile without the std::

RE: Borland C++ vs Standard C++

Try

#include <iostream>

   int main()
   { int i =10, j=20;
       int k = (i+j)/2;
      cout << "i is " <<i
                   << " and j is " << j << endl;
      cout << "average is " << k
                   << endl;
      return 0;
   }
:: is normally used when declaring a member of a class.
Once that is done ( cout is declared in iostream.h ) you
don't do it again, you just use it. I'm a little rusty with
standard C as I use Borland's C++ Builder but I believe that's the correct explanation. (If not I bet I'll hear about it ) )   <- smilely with a mustache, ha ha!


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close