473,385 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Question about compilers....

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
5 1225


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
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
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: cru | last post by:
I have a question in regard to floating point calculation behavior that exists between different compilers on the same hardware. Say, the difference between a console app written in windows using...
10
by: Bill Davidson | last post by:
Hi there, Please forgive me for posting this article on multiple groups. Being new in the newsgroups, I was not sure which group would have been appropriate for my question. Sorry. My...
5
by: biosync | last post by:
Hi, I'm a student (a poor student) and am looking for a free C++ compiler for the windows environment. can anyone please point me in the right direction. Cheers biosync
26
by: Method Man | last post by:
Say I have the following: int main(void) { char* p, q; p = (char*) malloc(sizeof(char)*10); q = (p + 100) - 99; /* legal? */ free(q - 1); /* legal? */ .... return 0; }
12
by: madhura | last post by:
Hello, I have a basic question about compilers. What are the different types of compilers, are they written by different companies, why there are different names of compilers, what is the purpose,...
12
by: Bit byte | last post by:
I have an application written in C (actually PostgreSQL). The application appears to have been built using the Mingw set of tools (mingw compiler tools). I want to write an extension library...
3
by: llothar | last post by:
I'm using SmallEiffel - which is more or less a huge preprocessor - for C. It has the option to compile the whole Eiffel program into one huge C file but doesn't add a static declaration to the...
20
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
There are a few guarantees I exploit in the C Standard. For instance, I might write (unsigned)-1 to get the maximum value for an unsigned integer. Also, I might rely on things such as: ...
17
by: Ben Bacarisse | last post by:
candide <toto@free.frwrites: These two statements are very different. The first one is just wrong and I am pretty sure you did not mean to suggest that. There is no object in C that is the...
9
by: C_guy | last post by:
I noticed that typedef enum _myEnum { enum1 = 0, enum2, enum3, .....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.