473,811 Members | 2,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Which compiler for a learner of C?

I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.

Downloaded Bloodshed Dev-C++

Very nice but the default auto-indent woupd break my heart as I depend
on indentation. This is how a loop is formatted by default.

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
int a = 0, b = 7;

for (a = 0; a <= b; ++a)
{
printf("Hello again\n");
}
system("PAUSE") ;
return 0;
}

That } that fails to align as it closes the "for" loop really puts me
off. If anyone knows how to fix this, this looks a fine compiler. Is
it good in the opinion of more experienced C programmers?

Is Visual C++ Express a good compiler?

Is there another for the Win32 platform that is recommended?

Sep 27 '06
46 2217
jaysome said:

<snip>
Have you ever actually installed and used a version of lcc-win32?
Nope. I use Linux. Why would I need lcc-win32?

But until recently, despite never having installed it, I had a link to it on
my Web site, suggesting it as a free compiler that people might like to use
if they happen to be on a Windows platform. I removed the link recently
because, after reading what Mr Navia has had to say in comp.lang.c in the
last few weeks, I lack confidence that the compiler is a conforming C
compiler.

That does not mean I am claiming it is not conforming. It means I lack
confidence that it is conforming. Just recently we discovered here in clc
that it was not conforming in one particular respect, and Mr Navia fixed it
very promptly when it was pointed out, for which he is to be commended. But
I'm wondering how many other non-conformances are lurking therein, given Mr
Navia's rather cavalier statements about pedantry.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 28 '06 #21
Michael Mair said:
Richard Heathfield wrote:
>pkirk25 said:
>>>I own a legit copy of Visual C++ 6.0

Its nice but it is 10 years old and aimed at C++.

It still does C just fine, though. It's a very good C compiler with a
fine IDE. In fact, on the rare occasions when I use Windows, it's my C
compiler of choice. (And I'm Mr Anti-Microsoft!)

Hmmm, that may be true for small to middle projects.
However, the fact that some of the standard headers lead to warnings,
Yes, the most stupid being the // in math.h

But in fact that was the only one I couldn't get rid of, at Warning Level 4.
(Many a time I've been tempted to go and hack math.h into bits.)
that you cannot rely on the optimisation to produce the same programme
behaviour as unoptimised code, and that it cannot compile and link
projects of a certain size in Debug mode make it a beginners' tool in
my eyes.
Check the topic title again. :-)

And in any case I've compiled and linked programs hundreds of KLOC in size
on VStudio without problems. I accept that hundreds of KLOC counts as a
middle-sized project at most, but I doubt whether a much bigger project is
worth developing on Windows, since surely such a large development
investment merits spending a little extra to acquire a stable platform. :-)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 28 '06 #22
BRG
pkirk25 wrote:

[snip]
Is Visual C++ Express a good compiler?
This depends on your criteria for 'good' but for simple C/C++
development tasks on the Windows platform I would say 'yes' provided you
don't mind the overhead of what is a large package.

The Express compiler has a few limitations (e.g. no 64-bit support) but
the IDE is very good and the compiler comes with an optimiser that is
capable of producing very good code.

However the IDE/compiler is a large package and takes considerable time
to download and install. It also takes up quite a lot of disc space and
you also need the platform SDK if you want to develop code to run on
Windows (the SDK is another large download). Also the documentation,
although extensive, is not ideal for someone who is learning C/C++ since
it is oriented towards professional developers and Windows applications.

So you need to invest time and effort to get up and running with VC++
Express but I think the result will probably justify this investment if
you run Windows.

Brian Gladman
Sep 28 '06 #23
Richard Heathfield wrote:
jaysome said:

<snip>

>>Have you ever actually installed and used a version of lcc-win32?


Nope. I use Linux. Why would I need lcc-win32?

But until recently, despite never having installed it, I had a link to it on
my Web site, suggesting it as a free compiler that people might like to use
if they happen to be on a Windows platform. I removed the link recently
because, after reading what Mr Navia has had to say in comp.lang.c in the
last few weeks, I lack confidence that the compiler is a conforming C
compiler.

I still have your book in the bibliography section in my tutorial.
I am able to distinguish between my personal like/dislike for
a person, and his work, that should be judged independently of the
author.
jacob
Sep 28 '06 #24
[snip]
The Express compiler has a few limitations (e.g. no 64-bit support) but
the IDE is very good and the compiler comes with an optimiser that is
capable of producing very good code.
Brian Gladman
Brian, the IDE is lovely - and based on your advice I skipped the MSDN
download so saved 3.8 gigs of disk space and probably will be in much
the same position I am now - Google is the ultimate manual.

Many thanks.

Sep 28 '06 #25
jacob navia said:
Richard Heathfield wrote:
>>
But until recently, despite never having installed it, I had a link to it
on my Web site, suggesting it as a free compiler that people might like
to use if they happen to be on a Windows platform. I removed the link
recently because, after reading what Mr Navia has had to say in
comp.lang.c in the last few weeks, I lack confidence that the compiler is
a conforming C compiler.

I still have your book in the bibliography section in my tutorial.
I am able to distinguish between my personal like/dislike for
a person, and his work, that should be judged independently of the
author.
What has liking or disliking to do with it? I can't abide Microsoft, but I
still provide a link to their compiler.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 28 '06 #26
pkirk25 said:
I skipped the MSDN
download so saved 3.8 gigs of disk space and probably will be in much
the same position I am now - Google is the ultimate manual.
And anyway MSDN can be found at http://msdn.microsoft.com so you simply
browse the bits you need when you need them. Handy for Win32 stuff. For C
stuff, though, I suggest a decent C reference book rather than MSDN!

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 28 '06 #27

BRG wrote:
pkirk25 wrote:
Actually, while it looks nice enough, it doesn't compile my existing C
code.

..\parameters.c pp(13) : error C2440: 'initializing' : cannot convert
from 'void *' to 'char *'
Conversion from 'void*' to pointer to non-'void' requires an
explicit cast

Also it swaps you in warnings like
..\parameters.c pp(38) : warning C4996: 'strcpy' was declared deprecated

Sep 28 '06 #28
"pkirk25" <pa*****@kirks. netwrites:

[about some implementation]
Actually, while it looks nice enough, it doesn't compile my existing C
code.

.\parameters.cp p(13) : error C2440: 'initializing' : cannot convert
from 'void *' to 'char *'
Conversion from 'void*' to pointer to non-'void' requires an
explicit cast
A file whose name ends in .cpp is generally C++, not C. That's a
C++-specific error. Try renaming it to parameters.c.
--
Here's a tip: null pointers don't have to be *dull* pointers!
Sep 28 '06 #29
"pkirk25" <pa*****@kirks. netwrote in
news:11******** **************@ h48g2000cwc.goo glegroups.com:
>
BRG wrote:
>pkirk25 wrote:
Actually, while it looks nice enough, it doesn't compile my
existing C code.

.\parameters.cp p(13) : error C2440: 'initializing' : cannot
convert from 'void *' to 'char *'
Conversion from 'void*' to pointer to non-'void'
requires an
explicit cast

Also it swaps you in warnings like
.\parameters.cp p(38) : warning C4996: 'strcpy' was declared
deprecated
C is not C++, remember. If your file names are *.cpp, I'm dubious
that your compiler is trying to compile them as C.

--
rzed
Sep 28 '06 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
2180
by: larry | last post by:
I was just looking at a demo training that mindleaders has on .net training: http://www.mindleaders.com/products/democourse3.asp And I don't believe this is correct or at least is misleading to me: "The search for an easy, productive, and very powerful programming language led to the birth of Visual C#. Visual C# incorporates the best features of Visual C++ and Visual Basic. Visual C# enables you to
0
273
by: Simon | last post by:
I've had enough of C# Learner. I've had enough of his complaining about using parentheses for every 'if' statement. I've had enough of his complaining about having to mix assignment of return value of methods with flow control, making writing code that's both readable and consistent, impossible. C# Learner is hindered by his complainging about C# being hindered by its predecessors and the Microsoft marketing department. If C# Learner...
0
9731
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5556
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5697
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4342
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3871
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.