Posted: Tue Feb 15, 2011 10:54 am Post subject: c download
From Where can i download c compiler. (for windows vista)?
Sponsor Sponsor
Insectoid
Posted: Tue Feb 15, 2011 11:09 am Post subject: RE:c download
MinGW is a fairly popular C/C++ compiler for Windows.
DemonWasp
Posted: Tue Feb 15, 2011 11:10 am Post subject: RE:c download
That depends. Which compiler do you want? C is a language, and there are a lot of different compilers for it.
There's Intel's compiler, ICC. Or there's the GNU C Compiler, gcc. Or there's the Microsoft Visual C[++] Compiler.
I would tend to recommend that you install MinGW, which is a distribution of the GNU C Compiler and associated toolchain for Windows. You can find it here: http://www.mingw.org/
mirhagk
Posted: Wed Feb 16, 2011 3:11 pm Post subject: RE:c download
http://www.microsoft.com/express/Downloads/ Not open source, but is free, and definetly the easiest to use. However only works for windows. (although your c code can be run on anything, just need a different compiler)
DemonWasp
Posted: Wed Feb 16, 2011 5:24 pm Post subject: RE:c download
Note: just because your code compiles and works correctly on Windows does not mean it will compile or run correctly on other platforms. Many functions behave differently, in both great and subtle ways. Unless you write with extreme care, your C code will not automatically be portable to another platform: you will have to do a lot of work.
This workload can be decreased if you use the same compiler, such as gcc, everywhere.
Of course, if you're writing on Windows, for Windows, and you never have to write for Linux, Solaris, OSX, AIX, HP-UX or any other system, then the Microsoft compiler is probably an okay choice.
mirhagk
Posted: Thu Feb 17, 2011 8:23 am Post subject: RE:c download
Most students never write programs for Linux, and the time saved writing your program, will be what is lost porting your code. Sure functions behave a little bit differently sometimes, but so long as you use cross platform libraries, it isn't too much of a pain to port code.
Again a huge portion of students will never even have to worry about this, since they do not use Linux, there is really no point making programs for it unless your making actual software, which is pretty far away for students.
Dan
Posted: Thu Feb 17, 2011 9:20 am Post subject: Re: RE:c download
mirhagk @ 17th February 2011, 8:23 am wrote:
Again a huge portion of students will never even have to worry about this, since they do not use Linux, there is really no point making programs for it unless your making actual software, which is pretty far away for students.
For simple C programs, alot of what makes a program portable are also good programming partices. For example not using system("pause"). Teaching students to write protable code is also teaching them to write good qaulity code in many cases.
Also i think programming and computer science students should be learning about Linux, Unix, and other environments. *nix based systems are in the magority when it comes to server and web based platform and web/server/network programming jobs make up a large part of the industry.
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
DemonWasp
Posted: Thu Feb 17, 2011 9:57 am Post subject: RE:c download
I've yet to hear of a university-level computer science program that encourages its students to write C code for Windows. If you're writing C or C++ at the university level, it's practically guaranteed that you're writing for Linux or Solaris or another *NIX. Other languages are similar, if a little less strict.
Sponsor Sponsor
mirhagk
Posted: Thu Feb 17, 2011 12:33 pm Post subject: RE:c download
Yes both of you are right. But it's MUCH easier to program using Visual Studio, and for the first year or so of someone learning to program, you want it to be easy, open and inviting. And learning to use system("pause"); for one year isn't going to kill you, you just pick that up after you learn how to program.
And yes Linux and Unix environments are what you use for servers, but not every job uses servers. It's like saying you should learn how to program for the iPod touch, since a large portion of the industry is that. Yes it's useful, it's not required.
And again, most people have a hard time doing pretty much anything in linux/unix so it's not ideal for the first thing. This guy obviously has just entered C++ programming, if he doesn't know any compilers, so giving him one that's easy to use will be best.
(Also I've heard that remark about using system("pause"); before. Yes it's slower BUT YOUUR PAUSING, SO WHO CARES!!!!!!!!!!! The only thing is that it's not cross platform. But it's alot faster to type, and easier to understand. I see too many people make console programs that don't wait at the end for output, because they refuse to go through the effort of couting a messsage and cin-ing garbage. getting them to use system("pause") is alot easier)
And @Demonwasp he's clearly not taking university for computer sciences. Also writing C at the university level means your likely doing something low level, so clearly not for windows. Many university programs teach using XNA, or C# or windows forms etc. They are easier to use, and let's be honest, a great deal of software actually does use windows forms or C# and especially .NET
Insectoid
Posted: Thu Feb 17, 2011 12:52 pm Post subject: RE:c download
It's actually MUCH easier to program using a basic text editor w/syntax highlighting and a command line because you don't need to worry about what VS is doing in the background. Many people in my class have to start new projects or comment out sections of code just to do the next problem in an assignment because they don't know how VS works.
With a command line, you just create your file and compile it, then run it. No needless crap.
I personally connect to my school's UNIX server for labs because Pico is so much better for me than VS.
Dan
Posted: Thu Feb 17, 2011 2:13 pm Post subject: Re: RE:c download
DemonWasp @ 17th February 2011, 9:57 am wrote:
I've yet to hear of a university-level computer science program that encourages its students to write C code for Windows.
Most of the university level courses i have had and TAed don't relay enforce what complier, IDE or OS you are coding for as they care more about the ideas than the direct application. At lakehead we both have VS installed on the lab computers and a SunOS server that provides free shells to students so they can use a *nix environment in which they can use pico and gcc. It is mostly up to the prof what they may encourage or use in the their labs.
However....
mirhagk wrote:
Yes both of you are right. But it's MUCH easier to program using Visual Studio
From my anecdotal evidence TAing 0 level CS courses (CS courses aimed at none CS students who have never programed before) almost all students in theses courses hit a massive learning curve when it comes to set up a project in VS for C or C++. It takes almost a 3 to 4 weeks before their a labs with out a student having issue with their project being messed up in some way that prevents their code from compiling. However in the courses that use a ssh client and a unix shell the students normally get the idea after the first few labs. The only hard part is logging (they use putty so that has a GUI) and rembering the 3 commands they need to know (pico, gcc and ./a.out). No messing around with projects which are pointless for programs that are as simple as first years make.
Also VS has a C++ compiler and makes .CPP files by default. I have seen this lead many students to make horiable messes of 1/2 C++ 1/2 code and 1/2 code using libraries and functions comanly used in C. In some cases their are also settle diffrences between C++ and C where they may put in code from their text book and get errors as they have the project set up with .CPP files compling as C++ code. Also simply finding their .C file is a mess in VS, even if they can find their project folder, they have to navigate through several folders to find their code to print or submit it.
I could go in to detail about how wrong system("pause") is but a simple google search will fill you in and i have to run.
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
DemonWasp
Posted: Thu Feb 17, 2011 3:05 pm Post subject: RE:c download
@bookworm: If you haven't decided yet, any of the links in this thread are valid choices. Don't be scared out of one or the other because of the rest of the discussion here. Hell, download all of them and see which one you like best. Starting with one won't lock you into it for life, and it'll be relatively easy to change to another. You have plenty of choices, and we've only listed a few, so start exploring.
@mirhagk: You are confusing the advantages of an IDE with those of Microsoft's compiler. The OP asked for a compiler, not an IDE; if the OP wants an IDE, there are plenty of those that could be suggested.
Also, since when do people not write "low level" code for Windows?
mirhagk
Posted: Thu Feb 17, 2011 3:16 pm Post subject: Re: RE:c download
First of all, demonwasp is write in that you should probably download them all, and try them all out.
DemonWasp @ Thu Feb 17, 2011 3:05 pm wrote:
Also, since when do people not write "low level" code for Windows?
What I meant was like interfacing with hardware, and operating systems and networking. All of which SHOULD be done using linux (maybe not interfacing with simple pieces of hardware). And by low level code I mean the complex code which does amazing things but is hella confusing. High level code is the drag and drop of VS 2008's form application designer. Should clarify that
Also a first level course shouldn't really deal with projects, they should just ignore them and treat them as if they were programs, ie make a new solution every time you make a new program.
Dan
Posted: Thu Feb 17, 2011 3:37 pm Post subject: Re: RE:c download
mirhagk @ 17th February 2011, 3:16 pm wrote:
What I meant was like interfacing with hardware, and operating systems and networking. All of which SHOULD be done using linux
Why?
Quote:
What I meant was like interfacing with hardware, and operating systems and networking. All of which SHOULD be done using linux (maybe not interfacing with simple pieces of hardware). And by low level code I mean the complex code which does amazing things but is hella confusing. High level code is the drag and drop of VS 2008's form application designer. Should clarify that
I am a big fan of linux, but i don't follow the arugment here. I don't think you follow the same classficatoin of high level and low level programing as most peoleop.
Quote:
Also a first level course shouldn't really deal with projects, they should just ignore them and treat them as if they were programs, ie make a new solution every time you make a new program.
Thats the problem tho, it adds an uneeded layer of complication that adds nothing in this case
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
mirhagk
Posted: Thu Feb 17, 2011 4:57 pm Post subject: RE:c download
Linux is alot better for things like that. And yes one layer of complication, that does help later on, but its like alot of things, you dont need it right away, and its just extra complication for a n00b.
Anyways back to the point, if you want something that is cross platform grab the Mingw, if you want something windows only, and are actually looking for an IDE rather than just a command line compiler and a text editor, grab the visual studio link i provided.