LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-07-2023, 06:36 AM   #1
atjurhs
Member
 
Registered: Aug 2012
Posts: 316

Rep: Reputation: Disabled
C++


i've taken the dive, so can someone share with me a good website/tutorial for a TOTAL newbie to BEGIN learning C++

thanks!
 
Old 11-07-2023, 07:04 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
no, one tutorial will not be enough, especially if you have no idea about OOP.
for example: https://www.educative.io/blog/how-to...-for-beginners
 
1 members found this post helpful.
Old 11-07-2023, 07:54 AM   #3
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,150

Rep: Reputation: 393Reputation: 393Reputation: 393Reputation: 393
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.
 
Old 11-07-2023, 07:55 AM   #4
atjurhs
Member
 
Registered: Aug 2012
Posts: 316

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
no, one tutorial will not be enough, especially if you have no idea about OOP.
for example: https://www.educative.io/blog/how-to...-for-beginners
looks like a great starting point, thanks!
 
Old 11-07-2023, 07:20 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
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, write it down 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.
 
Old 11-07-2023, 08:44 PM   #6
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,000

Rep: Reputation: 472Reputation: 472Reputation: 472Reputation: 472Reputation: 472
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
 
1 members found this post helpful.
Old 11-08-2023, 10:53 AM   #7
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 794

Rep: Reputation: 253Reputation: 253Reputation: 253
I like these guys: https://www.tutorialspoint.com/cplusplus/index.htm

Work through that and then go from there. Type in all the examples because that's how you learn.
 
Old 11-08-2023, 11:32 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 11-08-2023, 01:48 PM   #9
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,874
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
Two useful documents:
https://www-users.york.ac.uk/~ss44/joke/cpp.htm
https://yosefk.com/c++fqa/index.html
 
1 members found this post helpful.
Old 11-08-2023, 02:15 PM   #10
wainamoinen
Member
 
Registered: Sep 2009
Location: Belgium
Distribution: Slackware
Posts: 32

Rep: Reputation: 24
Quote:
Originally Posted by NevemTeve View Post
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.
 
1 members found this post helpful.
Old 11-09-2023, 10:19 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
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.
 
Old 11-10-2023, 12:41 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
Quote:
Originally Posted by sundialsvcs View Post
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.
 
Old 11-10-2023, 12:44 AM   #13
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,646
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
ISTR that Linus Torvalds doesn't like C++.
 
Old 11-10-2023, 01:51 AM   #14
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,000

Rep: Reputation: 472Reputation: 472Reputation: 472Reputation: 472Reputation: 472
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
 
Old 11-12-2023, 09:55 PM   #15
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration