ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
I'd recommend picking up a course on Udemy. I did one with regular C, got a package deal with beginning and advanced c and I've learned a ton. But admittedly it's not he same as a proper education or course. Either that or my mind just won't open to the concept of programming in general. I can do syntax all day long. But I just can't wrap my head around some concepts. Maybe I'm just to old...
Last night I grabbed a C++ course for 20 bucks, normal price 120US. So I'm starting that one. Will see. At the very least I'm doing something useful by learning, even if I can't really make full use of it in my life. Education is rarely a bad thing no matter how you get it.
Another thing that I like to do is to go to some shared-source site such as github or sourceforge and search for applications which are written in the language of interest. Then try to pick a small one.
These are actual, complete, debugged applications which were usually written by experienced coders. Start browsing through the source-code and see what you can understand ... and what you don't.
Keep close at hand a loose-leaf notebook ("journal") and a number-two pencil (and sharpener). When you encounter something, writeitdown as best you can in your own words. Time-and-date each entry. Then, try to keep moving along. This will help you to avoid "jumping down rabbit-holes" each time this happens ... and, especially at first, it will of course happen a lot. And yes, at least for me, I find that it works better to slow down and write things down with an actual pencil. (Never "tear pages out of" that notebook. You can "lightly 'X' them out," but never remove them.)
This has actually been a very good learning technique for me, because, as a consultant, I very often have to familiarize myself with brand-new things very quickly. As they say, "You can learn a lot by watching." And this strategy comes pretty close to "looking over someone else's shoulders."
While you're looking things over, try to take a broad view first. How did they organize the project? Is there a makefile? What was – if you will – the designer "thinking?" And how did (s)he use the available facilities of the language? Even if ["C++"] is now an unfamiliar language to you, it's quite likely that you have seen many concepts before, in other settings. Good ideas get re-used.
Periodically, look back through your journal notebook. If something is "suddenly clear," make a new latest-entry in that journal, explaining it to yourself in your own words. ("Tag" the earlier entry with the date of the later one.) If it isn't (yet), just move along.
I actually keep such pencil-and-paper(!) journals about every project that I do. By now I have several shelves full of them. It's interesting reading.
Last edited by sundialsvcs; 11-07-2023 at 07:30 PM.
One thing you will notice about C++ is that it is an evolving language: every few years a new version comes out that changes the preferred way of doing things. C++ programs from a decade apart can look quite different.
I suggest focusing on the basics of classes, constructors, and inheritance.
Ed
The FQA (frequently questioned answers) page is full of interesting insights about C++, I learned a lot with it. Particularly I learned why C++ is a mess, and why it is so easy to overengineer with it. I do like programming with C++, but it takes a lot of effort to keep it simple and not to abuse of abstraction.
C++ is, indeed, a "trendy" language for computer geeks. Everyone is always coming up with a better XXX different XXX way to do something, and it gets added to the latest version of the language. Of which there are very many.
C++ is, indeed, a "trendy" language for computer geeks. Everyone is always coming up with a better XXX different XXX way to do something, and it gets added to the latest version of the language. Of which there are very many.
but anyway, OP can start with c++11 (which is the state of the language at 2011). In fact, the new (post-added) parts cannot be understood without strong background knowledge.
C++ is unsuitable for bare hardware because the language assumes a heap manager.
I use C++98 because the programs that I have written are older than that. C++ is a good language at its core, but the feature-itis has been a distraction.
Ed
I agree with that opinion, EdGr. Some of the "latest fee-churs" seem to me to reflect, as I said, "fads." It's not really a monumental new language capability: it's just yet another way to do something. Fortunately, you don't have to.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.