C++ Compilers? Help!

Started by
7 comments, last by JD 19 years, 4 months ago
Hey. I am really new to programming right now and am trying to teach myself C++ on my own right now. So far it is going okay and I am comprehending what I am reading. But I am trying to make lil programs myself and inputting the ones from my readings into a compilers so I can familiarize myself with the code, but the compiler I have is way to advanced. I have Microsoft Visual Studio .NET 2003 and am just mind boggled by it. I was wondering if anyone could recommmend a compiler that would be easy to use. One that I can just plug in my code and go with it.
Advertisement
IMO, I'm using MSVS6, and it isn't too bad. But I've never had the chance to run anything newer than .NET, due to.. uh... OS inadequacies.

I have to agree, though, that it was hard to figure out at first (the whole workspace, project, and file structures) but once you get past that it gets easier. And I'm pretty sure almost all compilers do this, but I'm not entirely sure (from lack of experience).

MSVS has a handy wizard that makes an empty project. Check if there is a "Create Console App" or something of the sort in the window that pops up when you use the "File>New" menu. Or look for the wizards.

Anyway, in there is the option to create an empty project. This is what you want.

After you create it, go to "File>New" again and create a C++ Source file (.cpp). And voila! You're free to program in there! Just type in something like:
#include <iostream>int main() {cout<<"Hello world!"; int something; cin>>something; return 0;}

compile, run, and see if it works. (I hope I didn't make a stupid mistake in there! [grin])

Best of luck!
Thanks. I wish I knew of how to get a copy of MSVS6. Any suggestions? I dont think I can get it from my school as they are using .NET.
Just suck it up and take the time to learn how to use it. To create a console application in VS2003:

* Go to File->New Project
* Choose "Visual C++ Projects" from the treeview.
* Choose "Win32 Project" on the right.
* Enter a name for the project in the "Name" textbox, as well as a path to where the project should be located under "Location"
* Click OK
* Select "Application Settings" in the dialog that comes up
* Choose "Console Application"
* Check "Empty project" if you don't want the wizard to create any default files for you
* Leave everything else unchecked/unselected
* Click Finish
* If you checked "Empty project", you must now add files to the project. Right click on the project node in the Solution Explorer and go to Add->New item. Choose "C++ File" and enter a name before hitting "Finish".
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Thanks for the tip there Arild Fines! I just recently got VS2003 myselft and have been making console projects by just selecting it from the project menu, was wondering how to get rid of all of the crap that VS adds by default.
You''re about as ate up as a football bat.
To be true, MSVC .NET is not a compiler. It is an Integrated Development Environment. The compiler is the command line tool that gets executed when you tell VC to "build" your application - the compiler is that thing that most VC users wouldn't even know how to call from the command line. :-)

For beginners, VC++ .NET is actually a very good tool. Just spend some time with it, you'll get used to it.
=========================Buildium. Codium. Fragium.http://www.aklabs.net/=========================
If you choose not to use .NET then I would suggest Dev-C++. I have .NET and learned VB with no problem ,but when I taught myself C++ I found .NET throwing in a bunch of stuff I wasn't too familiar with. I really like Dev-C++ though, and another good thing is that it's free.


http://www.bloodshed.net/download.html
I can say that Dev-C++ was a huge help for me when i was starting to program C++ becuase it makes the set-up (i.e. workspaces, projcts a,d that stuff) easier to handle. Then i moved on to Microsoft's compiler which, after Dev, was really easy to fall into. So i can defintely vouch for Dev-C++.
I haven't done this but you might be able to just use the command line tools to compile and run your program w/o the use of IDE. Maybe try borland's free c++ command line tools and I also think MS has free c++ 2003 avail. for download from their website. You then need to give your source files to the compiler that will create .obj files and give those to the linker to make .exe file out of them. This process might be bit different or automated though. This way you can concentrate on the coding part rather than messing with IDE. There are also linux based compilers avail. for windows both with and without and IDE. If you want a C compiler try free lcc-win32 compiler as its IDE might be easier to deal with. I agree, the IDE issue is kind of a thorn in the otherwise smooth road.

This topic is closed to new replies.

Advertisement