(• Reading time: 7 minutes •) “C++ is designed to let you express ideas, but if you have no ideas or have any clues on how to express them, C++ Not much help.” ~ Bjarne Stroustrup (Danish Computer Scientist, Creator of C++)
Is C++ hard to learn?
Yes, C++ is hard to learn both for people who are completely new to programming and those who have programmed before but have never done low-level programming specifically (like C or Assembly). There are a few areas you’ll need to master C++ quickly but let’s talk about the timeline first. If you are completely new to programming, it will take at least 3 months to learn C++. That is working at least 2 to 3 hours a day. However, if you have programmed before, working at least an hour a day, it will take you 1 to 3 months to get the basics, and if you want to build proficiency in C + +, it will take you at least 2 years. Programming proficiency Time will take Absolute beginner At least 3 months Already a programmer 1 – 3 months Build proficiency in C++ 2 years – forever
C++ for Beginners and How to Approach it
Should you learn C before learning C++?
If you’re wondering if you should learn C before learning C++, the answer is absolutely not – you can and should jump right into C++. C++ is built on top of C, but C++ has powerful features and libraries that will save you time.
What you need to learn the basics of C++
Like any programming language, you need to know how to:
- declare variables
- collect user input
- save data
- repeat an action through loops
- write a function to iterate over blocks of code
These are standards, and if you already know how to code, it shouldn’t be a big deal.Bjarne Stroustrup: “C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do that, you lose your legs. “It can be a little uncomfortable here and there, especially the arguments among C++ fans about the usage; or whether it should be removed altogether. It’s an interesting debate. But don’t worry too much about it.
Why it takes so long to learn C++
The reason C++ takes longer to learn is because of its quirks.
- Memory management
- References and Pointers
- Standard Template Library
- Threads and exception handling
These are powerful concepts to master. But they’ll make you bang your head against the wall, over and over. And once you’re done, that doesn’t mean you’re done. For any language, there is always a lot to learn. In C++, the more you learn, the more things you see that you didn’t know.
Existing programmers who want to learn C++
How long to learn C++ if already fluent in Java?
If you already know how to code in Java, you can get up to basic speed in C++ in 3 days as both share the same syntax. However, learning memory management in C++ can take 3 weeks or more for your mind to complete. There are many differences between C++ and Java but the biggest one is understand memory management, especially how to use pointers. In Java, memory management is controlled and automatically done for you by the system, but this is not true for C++. You have the right to manage memory like a C++ programmer and you have to learn how to do it well.
Some Similarities Between Java and C++
There are many similarities between Java and C++ but as a Java programmer you should know that both languages support: abstraction, encapsulation, polymorphism, static and dynamic binding.
- whose main function is their entry point
- similar data types (e.g. int, float, bool, char, string, etc.)
- use the same conditional statements
- loops follow the same structure
- Comment out similar code in both languages
These similarities make the transition from Java to C++ pretty easy in a few days.
Main difference between Java and C++
There are many differences between both Java and C++ but the biggest difference is that you are responsible for memory management in C++ but this is automatically handled in Java.
- Multiple Inheritance in C++ vs Single Inheritance in Java
- default arguments in C++ but none in Java
- constructor and destructor in C++ but Java only has constructor
- operator overloading in C++ but not in Java
- structure in C++ but not in Java
And many more. A lot of these are great to use in C++ but they also come with more complications, opening the door to crazy bugs.
So should you still learn C++?
Absolutely – learning a new language is always good no matter what level you are at. Now, “when should you learn C++?” is the more important question.
- Are you in C++ school because you don’t have a choice which language to start with? If yes, focus and learn as much C++ as you can. You’ll get an appreciation for how lower-level programming works.
- Already a programmer want to learn more? Props for you. If you are a Java programmer, then welcome to the world of C++. If not, don’t worry but you have to brace yourself.
Finally, learn as much as you can. And then, check functional programming as your next stop. C++ is a monster.
Thanks for reading
- Join the community: I help new programmers and junior developers focus on what’s important instead of endless trial and error. If you are interested in boosting your confidence and skills, join the email community.
- Follow on Twitter: Have questions, I’m most active on Twitter – please contact me. My DM is open.
Warning – I love research so I tend to back my advice and approach with concepts from Behavioral Psychology and Neuroscience.
Last, Wallx.net sent you details about the topic “How long does it take to learn c++? A breakdown.❤️️”.Hope with useful information that the article “How long does it take to learn c++? A breakdown.” It will help readers to be more interested in “How long does it take to learn c++? A breakdown. [ ❤️️❤️️ ]”.
Posts “How long does it take to learn c++? A breakdown.” posted by on 2021-08-12 09:42:07. Thank you for reading the article at wallx.net
- 1 Is C++ hard to learn?
- 2 C++ for Beginners and How to Approach it
- 3 Should you learn C before learning C++?
- 4 What you need to learn the basics of C++
- 5 Why it takes so long to learn C++
- 6 Existing programmers who want to learn C++
- 7 How long to learn C++ if already fluent in Java?
- 8 Some Similarities Between Java and C++
- 9 Main difference between Java and C++
- 10 So should you still learn C++?
- 11 Thanks for reading