I recently switched to Ubuntu from Windows 7. I was previously learning C++ with Microsoft's IDE, Visual Studio.
- How would I go about programming C++ on Ubuntu, preferably with an IDE?
You have the standard gcc that comes with Ubuntu. Just ALT+F2 and type
To start programming in the console, just type
then just press CTRL+X and press Y, then ENTER to save and close.
Compile this test.c file using gcc by typing:
This is one way.
Another way I recommend is using Code::Blocks which has been known to work since I have tested it (Ubuntu 8.04, 8.10, 9.04, 9.10, 10.04 and 10.10). Works right out the box, no errors, no nothing. The one I have used so far was Code::Blocks 8.02 but 10.05 came out a couple of months ago and it looks good.
You can install it by running
The last method I recommend is
I will leave here some links so you can test:
You would start with an editor with syntax highlighting, like gedit, scite, emacs, vi or something else.
You would then learn to compile by hand, what an include-path is, what a library-path is, how to switch warnings on and off, how to build .o-files, libraries (.so), executables, and how to build makefiles.
Then you would switch to an IDE, because now you would know what to configure to what values. It's harder if you don't know what, and don't know where. I don't use C++ anymore, so I only may say that from hearsay, Code::Blocks has some good reputation.
Whether it is useful as a visual GUI-Builder I don't know - it isn't even clear from your question, whether you're looking for such a thing.
As Olcay pointed out in the comments, you need to install c++ tools (compiler, linker and so on) for c++ - maybe some dev-packages (development) too.
It's not a typo, it is g++ for gnu-c++.
The two most popular IDEs (If you go by reviews on the software centre) are Code::Blocks and Geany. They aren't as feature packed as Visual Studio though.
To install them you can either search on the software centre for them or stick
in the terminal.
I recommend you to use QtCreator or NetBeans - you should try them and you will see that this 2 IDE's are the best for C++ development.
Depending on what you want to do, you might want to use: