Starting with C++

marshian

New Member
Messages
526
Reaction score
9
Points
0
For some alt reason or another (don't ask why...) I'm currently getting interested in learning C++...
But I've got a couple of questions.
  1. Do you need to compile C++ code?
  2. If so, where can I find a good compiler?
  3. What is a good IDE for C++? I currently use NetBeans (for Java) and I know it's possible to extend it to work with C++ as well, but I would like to know the advice of somebody.

Thanks,
Marshian
 

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
Yes, you need to compile C++.
First, may I ask what operating system you are using? (Mac, Windows, Linux)
If you are using Mac, use Xcode.

If you are using Windows, you can use Visual C++. Never tried it but it is probably fine.

If you are using Linux, open terminal and type "g++". Then type in whatever it tells you to in order to install it. Now you can edit with a Text Editor and save as .cpp and open terminal up and do "g++ filename.cpp". (Make sure you are in the correct directory) Then type "./a.out"
 

konekt

New Member
Messages
100
Reaction score
0
Points
0
Yes, it has to be compiled. A good IDE and no-dos-prompt-compiler you can use is Dev-C++ from Bloodshed. I personally user Visual C++ and some of Microsoft's other packages that I get free through university. You can also use Visual C++ express which is free and easier to integrate with outside libraries such as QT.
 
Last edited:

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
Oh, I didn't even know Visual C++ wasn't free. :biggrin:
For a test, try this sample program
[noparse]
#include <iostream>
using namespace std;
int main(){
cout << "Hello World!";
}
[/noparse]
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
Yes, I'm using Windows, I'll try Visual Studio and that sample program.
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
Alternatively you may try DeV C++ as an IDE. Its less complicated.

I'm currently already installing Visual C++ (which has a download of 87 MB, and in installation of 1.4 GB :eek:)
In case I don't like it (possible with all Microsoft products), I'll check that one out.

EDIT:
Visual C++ seems to be working, it'll take me a lot of time to get used to it, and to learn C++, but that example DeadBattery gave me works =D
 
Last edited:

Pi606

New Member
Messages
85
Reaction score
0
Points
0
Just to let you know...Visual C++ is different from C++. Visual C++ is managed, and runs on .NET.

Unmanaged C++ has no dependencies on .NET and is used by Dev-C++
However, i think that there is a way to write unmanaged C++ code in Visual C++

Correct me if i'm wrong, though.;)
 
Top