Hi there everyone, im new to programming and havent the faintest clue where to start (just so you know:rolleyes: ) . I want to learn C++ but havent the apps to test or write it. I downloaded the microsoft visual studio and it confused the hell outa me. Can anyone recommend a free app i can use to write and view my C++?

I have php pad which allows me to write but doeant have any option to view, what is a compiler? i know windows has one but how does it work?

Show pitty on the programming noob, maybe i can hook you up with some seo advice in return :cheesy:

Recommended Answers

All 9 Replies

Compilers turn the code you write into instructions your computer will understand. A linker links files to your program and finds the functions and variables contained within those files. An IDE (Integrated Development Environment) usually contains both a compiler and a linker and also usually has other software bundled in like a debugger, etc. I found that the free downloadable IDE called Dev C++ was pretty much download and go, but others have reported some difficulty setting it up. There are other IDEs as well, and someone may be able to help you set up your version of MSVC if you post what steps you've taken and explain the problem(s) you are having in as much detail as you can; include what OS you are using.

>I downloaded the microsoft visual studio and it confused the hell outa me.
Anything will at first. Either you have to deal with the complexity of an IDE (that's a compiler, debugger, editor, etc.. all rolled up into one graphical application), or the complexity of learning command line tools. You should learn both, but starting with an IDE will probably be easier. Since you already have Visual Studio, I can walk you through setting up a project and testing it.

Step 1) Go to File->New->Project
Step 2) From the project templates list, choose Empty Project[1]
Step 3) Type in whatever name you want for the project and hit OK
Step 4) Look for the Solution Explorer[2] and right click on the Source Files folder
Step 5) Choose Add->New Item
Step 6) From the templates list, choose C++ File (.cpp) and call it something like main, then click Add. Now the text editor has a text file in it called main.cpp.
Step 7) Paste this code into the editor:

#include <iostream>

int main()
{
  using namespace std;

  cout<<"Hello, world!\n";
}

Step 8) Type ctrl+F7 to compile the code
Step 9) Type ctrl+F5 to run it

After the project is set up, the work is minimal. If you want, you can just reuse the same project until you're more comfortable with the IDE. :)

>what is a compiler?
Simple answer: A compiler turns your source code into a working program.

[1] This is always a good idea because if you don't choose an empty project, Visual Studio will add confusing any annoying junk like precompiled headers.

[2] The default location is on the left side as a docked tool window.

Unfortunately i have already deleted msvc and i dont think im gonna get away with another 98mb download at work :) I am using winXP and my primary is to learn various languages and need one as a base, from what i have discovered c++ is the way forward, complicated but worth it. I will download an ide asap and get back to you with results.

Thanks For your help :)

I think Dev-C++ will be easier for beginners to learn the language because it doesn't have as complex an IDE as MSVC. Once you get to the place when you want to start writing MS-Windows gui programs then you should probably switch to the Microsoft VC++ 2005.

I'm total newbie too and I'm also using the dev-c++ and its the easiest to learn I think. hope that helps!

Hectic, it does work really well, especially compared to the other things ive tried :) I almost panicked when the hello world app wouldnt compile but then it did... and worked... shweet, thanks alot guys, i look forward to finding out more about the quirks after i get the basics in my veins

yes, dev c++ is the best for learning
theres lots fo good c++ tutorials on the net

Glad to hear it worked. For learning more about C/C++, you should definitely check out the Starting "C" and C++ Books threads. Online tutorials will only get you so far, so if you're serious about learning it, you should buy yourself a book.

some c++ books are too fst paced for my liking so go for something slow and simple - stay away from any visual c books (graphical applications) and concentrate in learning the basics via text applications first

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.