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

Got a question related to programming. I was planning to choose one more language, besides Java, and stuck between choosing C or C++. I am planning to create apps specifically for Ubuntu with GUI (Graphical User Interface) like (Wine, bumblebee and etc) so what is your recommendation? Which one should I learn C or C++? If you can, please also explain what language is orientated on what? Thank you very much I appreciate your answers!

share|improve this question

closed as primarily opinion-based by Seth Jan 2 '15 at 20:23

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

it is esyer to create GUI using java and not c++ nor c – geoh May 13 '12 at 15:17
up vote 2 down vote accepted

My answer will tell you that c++ is just a newer version of c.

C++ is meant to be backwards compatible with C, so you can write c code in your c++. If you are familiar with java, c++ is closer to that than c. Plus I would recommend c++ anyway.

These are just general differences between the languages though. your ability to create gui programs similar to the ones you have mentioned (neither of which i have used before) will have a lot more to do with the libraries / api for the window manager you chose than the language itself.

share|improve this answer

It depends which GUI do you want to use:

  • GTK+ (GNOME, MATE, Xfce, LXDE, ROX) and FLTK (Enlightenment) are written in C.
  • Qt (KDE and LXQt) is written in C++.
  • GNUstep (Étoilé) is written in Objective C.

(Source: Comparison of X Window System desktop environments)

  • Wine is written in C, of course.

(Source: Wine (software))


  • C is lower-level language, it is simpler, you can do practically anything in it, but you must code more - e.g. doing checking by yourself. You think in hardware language.
  • C++ is objective, it has larger standard library, you can utilise inheritance etc., so you write less code, but you cannot be such detailed how exactly thing will be done. You think abstractly in objects.

But in C++ you can use C. (And in C you cannot use C++.)

share|improve this answer

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