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 would recommend you to go through Dennis Ritchie and every time you refer to some author revert back and refer Ritchie again. Every time you refer Ritchie you will find something new and do not forget to cover every author if you want to be an expert.
Right here looking at the sticky note at the top of this forum.
Personally I recommend you understand C first, because you can also move "up" to C++. C++ has more, added concepts, but also abstractions which extend beyond the C language. There's also many directed intentions for C++ language which lean towards object oriented design. They're both fine languages and I'd learn them both, I'd just start by doing practice programs and exercises with C first and then moving to C++, probably using each of them a bit until you feel you understand them both well.
Further: "doing" is excellent learning. So I recommend the best approach is to load a Linux desktop distribution with the "build-essentials" package installed. For most typical desktop distros, you'll find that it's already there. And then you can use GCC to compile C and C++ programs. As you write stuff, you can post what you've done, indicate where you're stuck, or where you have a question and people here will certainly offer their thoughts to help you out.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152
Rep:
Trying examples is ok but can be dull and not very inspiring, try to come up with a project idea for yourself, even if its already done, finding out how to code all the bits and peices of your project and ending up with an application all your own is very fulfilling, many people start with a text editor as a simple one is quite easy to start off and shows quick results, and there are a lot of editor example code that you can browse, and you can add the little bells and whistles that no other editor has.
I want to start programming, but I dont know which is the best way to start C or C++. and if you know good video tutorials, please , write below
What rtmistler and Keith Hedger both said, and learn C first. If you learn C++ first you will likely find C to be more difficult and conclude that it is "lacking" something, which would not be correct, and you will miss the point of it all.
If you learn C first you will see its power and then find that C++ extends C, but it is also intended for a different basic programming mindset - you will get the best of both worlds!
And learn from the books and the keyboard - video is no substitute** for the printed word or the fingertips on the keys! If you must use video, learn to think of it as a limited usefulness supplement (my humble opinion).
**Why? There are many reasons, but I think it comes down to this: With all things, you get out of a thing in proportion to the effort you put into it. Video fundamentally requires no effort to watch, and the knowledge gained tends to be in that same proportion.
Last edited by astrogeek; 08-21-2015 at 05:35 PM.
Reason: Typos, nod to Keith Hedger who typed faster than I!
What rtmistler and Keith Hedger both said, and learn C first. If you learn C++ first you will likely find C to be more difficult and conclude that it is "lacking" something, which would not be correct, and you will miss the point of it all.
If you learn C first you will see its power and then find that C++ extends C, but it is also intended for a different basic programming mindset - you will get the best of both worlds!
And learn from the books and the keyboard - video is no substitute** for the printed word or the fingertips on the keys! If you must use video, learn to think of it as a limited usefulness supplement (my humble opinion).
**Why? There are many reasons, but I think it comes down to this: With all things, you get out of a thing in proportion to the effort you put into it. Video fundamentally requires no effort to watch, and the knowledge gained tends to be in that same proportion.
thank you very much. I'll take your advise thank you
Trying examples is ok but can be dull and not very inspiring, try to come up with a project idea for yourself, even if its already done, finding out how to code all the bits and peices of your project and ending up with an application all your own is very fulfilling, many people start with a text editor as a simple one is quite easy to start off and shows quick results, and there are a lot of editor example code that you can browse, and you can add the little bells and whistles that no other editor has.
I think your right. I was interesting how was built simple keylogger in C++ and when I saw and try understand code itself, I learned so much. thank you for your advice
Right here looking at the sticky note at the top of this forum.
Personally I recommend you understand C first, because you can also move "up" to C++. C++ has more, added concepts, but also abstractions which extend beyond the C language. There's also many directed intentions for C++ language which lean towards object oriented design. They're both fine languages and I'd learn them both, I'd just start by doing practice programs and exercises with C first and then moving to C++, probably using each of them a bit until you feel you understand them both well.
Further: "doing" is excellent learning. So I recommend the best approach is to load a Linux desktop distribution with the "build-essentials" package installed. For most typical desktop distros, you'll find that it's already there. And then you can use GCC to compile C and C++ programs. As you write stuff, you can post what you've done, indicate where you're stuck, or where you have a question and people here will certainly offer their thoughts to help you out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.