December 20th, 2012, 02:56 PM
Finally starting with c tomorrow
though this should have been a long ago but, my c classes are starting from tomorrow and i dont know what compiler to use.
i use a windows 7 64 bit system.
December 20th, 2012, 03:11 PM
Your instructor/school probably will tell you what compiler you're expected to use. They might even require you to use that compiler. One reason for such a requirement is so that your instructor can teach you how to use that compiler/IDE (integrated development environment, which combines editor, compiler, linker, debugger, project management, file management, etc). Another reason would be that not all compilers comply to all the current standards. Yet another reason would be that it can be almost impossible for the instructor to respond to students' problems in using their particular compiler if they're all using different compilers and/or different versions. You'll find out tomorrow which compiler is required or recommended.
If you are given a free choice in the matter, look into Microsoft's Visual C++ Express Edition. You can download and use it for free. It doesn't have all the features of the ones that you would have to pay for, but it does have the features that you will need, plus it has an excellent debugger.
On the matter of compliance to standards, the current standard is from 2011 (C11) and the previous standard is from 1999 (C99), though the standard that all the professionals I know of use is from 1989 (C89, AKA "ANSI C") -- to us, C89 is C. Microsoft does not support C99 nor C11, because most of what they've added is already in C++ and it's C++ that Microsoft wants to support. So if your class teaches C99, then Visual C++ won't work for you. Again, tomorrow in class you will learn what compiler to get.
December 21st, 2012, 04:11 AM
There is a C11 compliant compiler for windows called Pelles C. It's free.
I have been using it for a few months.
December 21st, 2012, 12:31 PM
If your instructor does not have a required compiler, then you can shop around, using Wikipedia as a guide.
If it needs to support C99, then consult http://en.wikipedia.org/wiki/C99. The Implementations section is a table of several compilers and a description of whether they support C99. Although the links in that table are to Wikipedia articles on those compilers, those pages usually also link you to the compiler's home page. A number of compilers are free. After researching some of them (or just coming up with a list), then you could ask us for our opinions.
The article on C11 (http://en.wikipedia.org/wiki/C11_(C_standard_revision)) does not have an implementations table, but it's so new I'd be very surprised of many compilers supported it yet.
December 21st, 2012, 04:52 PM
thanks guys, for all the suggestions. i am using dev c++ for now atleast.
did some basic programming and some few if else loop programs.
feeling good after completing all of them.
it was very easy this far lets see for tomorrow.
December 21st, 2012, 08:01 PM
Congrats; you picked the second-worst option (first-worst being Turbo C). Dev-C++ is old, buggy, and no longer supported.
I ♥ ManiacDan & requinix
This is a sig, and not necessarily
a comment on the OP:
don't be a help vampire
December 22nd, 2012, 01:27 AM
what would be a better choice.
Originally Posted by ptr2void
can i go for visual c++
December 22nd, 2012, 03:42 AM
December 22nd, 2012, 01:54 PM
Also on my Intro to C course. Thanks for the info about the Orwell update. Our professor prefers Dev-C++.
December 22nd, 2012, 02:47 PM
Then that is in agreement with your course requirements? As you will recall, my main concern was whether the instructor required using a particular compiler or at least one which supports C99, which Visual C++ does not.
Originally Posted by subhobose0003
Visual C++ is a good choice in that it has an excellent debugger and you gain experience with a development environment used by professionals. The down-side is that it takes more work to create a C project:
1. Create a new project. You must be absolutely sure that you create a console application and that you choose for it to be an empty project. It is very important to specify a console app, because otherwise it will create a Windows project which is a very different beast; we've gotten a number of cries for help because of that mistake, though it's been a while since the last one.
2a. Add a new item to the project, the source file. However, there is no option for a C source file, so you need to choose the C++ source file. Then you need to rename it with a .c extension so that the compiler will compile it as C. And you will need to clean up the program skeleton that Visual C++ creates for you, or even completely replace it -- almost trivial after the first few times.
2b. Create the C source file with another editor, save it as a .c in the project's source code directory, and use the Add Existing Item menu option to add it to the empty project.
Admittedly, that second approach doesn't make much sense when creating a new program, but I have used it a few times helping people on this forum when I had to run their code through a debugger, so I'd create an empty project, copy their source code into the project's directory, and added it as an existing item.
I also installed Dev-C++ years ago and almost immediately had to give up on it. I tried using it do to Windows programming, but the IDE was too buggy and would always disable controls that I needed to use.
However, I do continue to use the compiler that came with Dev-C++, the MinGW port of gcc. It is quick and easy to use for quick little programs to test something or for trying to run programs from this forum as part of my help efforts here. I simply use my favorite text editor (NoteTab Pro) to write the program, open a console (AKA "DOS window", AKA "Cmd Prompt") and chdir to where I saved the program, and run gcc from the command line.
So you do have the option of installing more than one free compiler on your system. That means that even if your instructor did require you to use a particular compiler for the class (eg, Turbo C, Dev-C++), that would not keep you from also installing Visual C++ Express Edition. The only thing to watch out for is that if you double-click on a C source file in Windows Explorer in order to open it, Windows will have assigned a compiler to that file extension and will open that program.
Also, when you post a question here about a problem you're having with one of your programming assignments, be sure to tell us what compiler you're using.
December 23rd, 2012, 01:53 AM
I was checking Orwell's official blogspot and came across "MinGW" and "TDM-GCC". What is the difference of the two and which setup should I get?
December 23rd, 2012, 08:38 AM
Thanks for sharing this information with me, i think i now get it. though can u explain again how to use the command prompt, i didn't get it properly.
Originally Posted by dwise1_aol
December 23rd, 2012, 09:28 AM
Uff da! (a Norwegian expression I picked up while in North Dakota)
I am 61 years old. At the age of 24 (Sep 1976), I enlisted in the US Air Force as an Electronic Computer Systems Repairman. In the winter of 1978, I enrolled in the local university's computer science program. In 1980 I completed my degree and in 1982 I started working professionally as a "software engineer". A few years later, I bought my first IBM PC clone and circa 1987 I was working extensively in MS-DOS.
Let me get Biblical for a moment here: In the Beginning there was the command prompt.
For a very long time, all you had was the "command prompt." Even further back than I can go, all you had was a terminal which was little more than a teletype. You entered a line of input and it output lines of output. Nothing at all like the present-day GUI interfaces.
What are you using? Windows? Somewhere, there must be a "Cmd Prompt" icon or something like that. If not, then run the program: Windows-R (which runs a program), cmd (which is the command-line "shell" of choice; there's also COMMAND.COM, but that's way too old-school). OK, that dumps you into a directory somewhere. At this point, you need to know something about your directory structure.
The command to change directory is chdir, which is better known as cd. On the C: drive, there is a root directory, which is called \ . All other directories stem out from that root. All your CD commands depend on where your directories are.
Now the question comes to your executable paths. From the command line, enter the command, PATH. That is our search path. That is to say that when you enter a command from the command line, the computer will search through that search path in that order to find that command.
Here is my batch file ( devcpp.bat ) placed in the existing search path:
Once you have that, you should be able to run gcc from the command line.
December 31st, 2012, 09:51 PM
sorry guys, had been off for a few days b'coz of all the things going on. but getting back to work from tomorrow. starting again with c. thanks