Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As a Web Developer I am familiar mostly with HTML5/JavaScript, PHP and Java... I have these Qs...
C or C++
I prepare to give the LFCS Admin Linux exam, is really benefit learning what C or C++ for further Linux progress?
Other separate Q
For studying Microprocessors textbooks is really benefit learning what C or C++ for further PC hardware/software engineering progress?
What IDEs used for C/C++ development for Linux...? Can use even Apple or MS products like Visual Studio or Xcode... ?
I use Code::Blocks Ide and Geany on several different platforms. I recommend learning c than c++. Most Linux distros have gcc installed. For cross platform gui I use wxWidgets which is written in C++.
I understand C and I don't understand C++, so I would say at a guess that C is easier to learn! But if you're cleverer than I am, C is still a good place to start because everything that is valid in C is valid in C++ too.
C++ was created to be compatible with C but add additional features. this was 30 yeas ago or so, so C is older than C++.
Today's C++ is way ahead of C, the compiler can do optimizations C can only dream about since it has much more information about the code, plus that the strong type system and other features allow to write you save code what C programmers also only can dream about.
This fact is not commonly known, unfortunately, and a lot of not well educated people float the internet with miss information (see above 2nd post fore example)
Not to mention those people that relay on out of date information form 20 years ago, or less competent rants from people about C++, like fore example, Linus, who happily uses C++ libraries for his diving application today ;-)
So be aware that, if you ask about the C/C++ topic, there will be a lot of misinformation for you.
To the original question.
There is C and there is C++ code, these are 2 different things.
The Linux kernel is written in C, like a lot of libraries and programs used.
It is for sure not wrong to start with C, especially if you want to learn about Linux.
Than it depends on what you will or are planning actually to do. But having some basic understanding of C is a good base for continues learning.
I'd also say that it comes down to what you want to work on. If you want to do systems-level work, then use C. If you want to do user-space graphical applications, then use Java or C++. So look at the tools you wish to work on and see whether they use C or C++ and let that influence your choice.
I'd also say that it comes down to what you want to work on. If you want to do systems-level work, then use C. If you want to do user-space graphical applications, then use Java or C++. So look at the tools you wish to work on and see whether they use C or C++ and let that influence your choice.
Since I know Java (& web tech like PHP and JS this may not relate) and plan to build GUI programs as in Java, definitely I have to go C++...?
In addition Studying giving LFCS Admin exam and planing reading Microprocessors textbooks and PC repair, building and troubleshooting ... especially the latter C++ is in addition the choice???
Since I know Java (& web tech like PHP and JS this may not relate) and plan to build GUI programs as in Java, definitely I have to go C++...?
In addition Studying giving LFCS Admin exam and planing reading Microprocessors textbooks and PC repair, building and troubleshooting ... especially the latter C++ is in addition the choice???
C++ is super set(contains all of) of C , correct?
You can do gui in c. but it is a lot easier in c++. And yes c++ does contain all of c.
c++ is object oriented, so you need to learn what does it mean and how to use. This is valid for all OO languages (like java too).
c is relatively simple, but actually really hard to use well. I would suggest you to learn it, but it will take some time (probably years) to know it very well.
C really isn't pure C anymore anyway, it includes a lot of features of C++ such as declaring variables anywhere, not just at the top of a code block. You kind of can learn them both simultaneously, learning the basics (mostly C) at first and then learning the more complex object-oriented, templating, and other features of C++ later. C++ is incredibly complex and is best learned bit-by-bit anyway, it's a huge thing to swallow at once.
I think even most professional C++ programmers rarely use all the features the language has to offer. Even its creator said it was way too complex. He was quoted as saying something to the effect that there was a much simpler language crying out to be extracted from C++ and he thought Java might be that language. Although Java has its own basket of troubles.
I log log time ago I took C++ first then took JAVA next wow did I ever catch on to JAVA really quick having already learned C++ first. so whatever is whatever if you have some back ground in one programming lang then it will cross over and help in any whatever lang you take next to learn - except FORTAIN maybe
but don't look at me for C++ or JAVA advice. they changed C++ a week or so after I took it, and Java both I do not use but I remember the basics of it and used it to learn what I know in BASH .. go figure.
ok maybe a little C I applied to it as well.
whatever lang you take next to learn - except FORTAIN maybe
Actually FORTRAN isn't that bad. For being the first high level language ever invented (like 1957 or so), it's remarkably similar to modern languages.
The one language I really hate is COBOL, it's worse than reading extremely wordy English. I had to translate a huge system of COBOL programs into Perl and it turned a full huge binder into just a few pages of code.
I came up the hard way: FORTRAN, Assembler, BASIC, Assembler, Pascal, Assembler, then C and COBOL together. I still use Pascal from time to time, and modify C source to change program behavior, but mostly shell (Korn and Bash with some Perl, Python, PHP, or whatever is needed).
At the time I started, Fortran was considered the only "true" compiler as it translated somewhat directly into IBM 36* machine code.
Target the language of the environment you want, but let me make this clear: you are training your brain not just learning a language. The more you learn, and the more languages you learn, the better you will "think into the machine" and write better code.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.