Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a brand new engineering student, my teacher told us that we need to program in C++, I am new to programming and to Ubuntu, I am installing the latest version of Ubuntu but I would like to know what else do I need to program in C++, I've been told to install Kate, can you please tell me what else I need? and where to find documentation related to programming and the programs I need? than you very much!

share|improve this question

closed as off topic by Rinzwind, binW, htorque, Jorge Castro, fossfreedom Jan 15 '12 at 10:17

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

You should ask this on the coding stackexchange. Your question has no relation to Ubuntu by itself (you can code on any OS). – Rinzwind Jan 14 '12 at 18:32
What you need is a platform (Ubuntu), an editor (like Kate but that is KDE. You can also use gedit. Have a look in ubuntu software center for editors ;) ) and some manuals or tutorials to start ( ). and of you go!! – Rinzwind Jan 14 '12 at 18:34
A c++ compiler is a pretty good thing to have as well. – Zoke Jan 14 '12 at 18:47
@Rinzwind: has quite a few errors and some terrible examples; anyone who actually wants to learn is far better off getting themselves a good book. – Anton Golov Jan 14 '12 at 23:33

You'll need to :

  • write code: a text editor of your choice (gedit by default or xemacs, vi, etc...) or an IDE (i'll recommend codeblocks or Eclipse + eclipse-cdt, etc.)
  • manage your code: aka use a Version Control System, optional at first while learning but you'll benefit from knowing git or mercurial once you'll start working on non-trivial projects.
  • compile code: install build-essential (includes g++, make, C headers, etc., don't go for a manual install of the compiler) sudo apt-get install build-essential
  • debug it: don't think you'll ever be able to skip this step ^^ sudo apt-get install gdb
share|improve this answer
+1 for mentioning version control – Martin Ueding Jan 14 '12 at 19:57
LMGTFY is not polite. – James Jan 18 '12 at 0:09
Look, considering i took some time to politely answer the question, i could just have said "google for some c++ tutorials to learn the language once you've installed everything you needed, i won't write one because the are lot of them around the web" but instead preferred to add a lmgtfy link to point out that i don't want to pollute my answer with info easily available with a search engine. So please, consider this a humorous note because so was my intention. I'm aware this can be use in a rude way but so are many of the words we use ^^ – Maxime R. Jan 18 '12 at 0:42
There are also many people that found it funny ;) – Maxime R. Jan 18 '12 at 0:43
@MaximeR I found it funny, however, not everyone else does. :) – James Jan 18 '12 at 0:44

You need an editor (Use one you like, gedit is preinstalled for Ubuntu, I, myself, prefer SciTE) and a c++ compiler.

The c++-compiler (g++) is found in the package g++. I would however recommend installing the package build-essential, it will install some more useful packages.

g++ can be invoked on the command-line like this: g++ source.cpp -o myprogram

Later when your programs will get more functions you will probably need some extra libraries. You can find them most easily via apt-cache search. Library packages have the suffix -dev or the prefix lib, e.g. zlib1g-dev for the compression library.

share|improve this answer

I would recommend to install eclipse if you intend to start coding in c++. It is a good IDE to familiarize yourself with as it has support for Java and Python among others to consider for the future; also it is the best supported IDE for developing android apps.

sudo apt-get install eclipse
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.