By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,260 Members | 1,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,260 IT Pros & Developers. It's quick & easy.

Question about compilers....

P: n/a
Hello my fellow programmers,

I have a question for you all: What is the best C++ compiler to use
when programming? I have used borland turbo C++ for awhile now,
however, I went out and bought a book by H. Dietel: C++: how to
Program. Its a lot different than my other C++ book. for instance
when using the cout code,,it uses it like this(in the dietel book)

std::cout<<"text...\n";

In my other academic textbook it uses cout like this:

cout<<"Text....\n";

When I put the std::cout<<"text..\n";
in my borland compiler,,i got an error message..something about a
class and that i was missing a ";" .

I've heard a lot of good things about microsoft visual C++. Is it a
good compiler to use to make simple programs? I'm not developing
major software apps(not yet). My programs are only 100lines
long,,if that.
Please point me in the right direction..I would really appreciate
it!

Thanks again,

Nathan ;)
--
--------------------------------- --- -- -
Posted with NewsLeecher v3.7 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Nov 4 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a


On Nov 3, 10:01 pm, Nathan (dyd...@hotmail.com) wrote:
Hello my fellow programmers,

I have a question for you all: What is the best C++ compiler to use
when programming? I have used borland turbo C++ for awhile now,
however, I went out and bought a book by H. Dietel: C++: how to
Program. Its a lot different than my other C++ book. for instance
when using the cout code,,it uses it like this(in the dietel book)

std::cout<<"text...\n";
This follows one of the later versions of C++.

Also, that's not the best way to do output. You should consider this
instead:
std::cout << "text..." << std::endl;
>
In my other academic textbook it uses cout like this:

cout<<"Text....\n";
Unless "using std::cout;" or "using namespace std" was declared, the
textbook that uses this construct is obsolete. This change is meant to
clean up the global namespace, which can cause problems if it is
unchecked.
When I put the std::cout<<"text..\n";
in my borland compiler,,i got an error message..something about a
class and that i was missing a ";" .
You'll need to upgrade your compiler to a later version. If such a
version doesn't exist, you may have to look for a different compiler.
As long as your new choice abides by the latest standard, you shouldn't
have any trouble.

Nov 4 '06 #2

P: n/a
dy****@hotmail.com wrote:
Hello my fellow programmers,

I have a question for you all: What is the best C++ compiler to use
when programming?
That's a bit like asking "what's the best car to use?"

There are may platforms and may choices of compilers for each.

Try a group dedicated to programming on you operating system.

I have used borland turbo C++ for awhile now,
however, I went out and bought a book by H. Dietel: C++: how to
Program. Its a lot different than my other C++ book. for instance
when using the cout code,,it uses it like this(in the dietel book)

std::cout<<"text...\n";

In my other academic textbook it uses cout like this:

cout<<"Text....\n";
So it probably tells you to use <iostream.h>. If so, throw it away, it
is out of date.
When I put the std::cout<<"text..\n";
in my borland compiler,,i got an error message..something about a
class and that i was missing a ";" .
So it probably lacks standard headers (<iostreamin this case). If so,
throw it away, it is out of date.

--
Ian Collins.
Nov 4 '06 #3

P: n/a
Raymond Martineau <bk***@freenet.carleton.cawrote:
>On Nov 3, 10:01 pm, Nathan (dyd...@hotmail.com) wrote:
>std::cout<<"text...\n";
>This follows one of the later versions of C++.

Also, that's not the best way to do output. You should consider this
instead:
std::cout << "text..." << std::endl;
Wasn't there a discussion about this just a few weeks ago,
concluding that "endl" is evil?

Steve
Nov 4 '06 #4

P: n/a

Steve Pope wrote in message ...
>Raymond Martineau <bk***@freenet.carleton.cawrote:
>>On Nov 3, 10:01 pm, Nathan (dyd...@hotmail.com) wrote:
>>std::cout<<"text...\n";
>>This follows one of the later versions of C++.

Also, that's not the best way to do output. You should consider this
instead:
std::cout << "text..." << std::endl;

Wasn't there a discussion about this just a few weeks ago,
concluding that "endl" is evil?

Steve
'endl' is not "evil". It sends a '\n' and flushes the buffer (sometimes
needlessly).

std::cout << "text..." << std::endl;
std::cout << "some more text..." << std::endl;

could better be written:

std::cout << "text...\n";
std::cout << "some more text..." << std::endl;

or:

std::cout << "text...\n"
<< "some more text..." << std::endl;

I think the point was: 'over use' is evil (like I do. <G>).
To OP [my opinion, not the groups]:
If you are using windows, I highly suggest Dev-C++ IDE (with the MinGW port
of GCC). It is an easy install. You can later point the IDE to use other
compilers, or point other IDEs to use the MinGW GCC compiler(s). ($=a
download).
Dev-C++ IDE: http://www.bloodshed.net/

--
Bob R
POVrookie
MinGW (GNU compiler): http://www.mingw.org/
MinGWStudio http://www.parinyasoft.com/
Nov 4 '06 #5

P: n/a
Thanks a lot for the suggestions guys. I am now using Microsoft
Visual Studio 2005 Professional. Is that good enough? Or is that
"current" with the new standard.

Thanks again!!
--
--------------------------------- --- -- -
Posted with NewsLeecher v3.7 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Nov 4 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.