For on-line learning, the best free site is
https://www.learncpp.com/
For a book I would recommend Beginning C++ From Novice to Professional
https://www.amazon.co.uk/Beginning-C-20-Novice-Professional/dp/1484258835/ref=sr_1_3
everyone has a different style of programming |
Given 6 programmers, you'll get at least 9 different programs!
i want to learn, not copy and paste lines of code! |
As
part of learning, copy and pasting code can be useful providing that you examine and understand the code. Note though, that there is much 'bad' C++ code on the internet. Not everything there is 'good' code.
Also note that over the years the C++ language has evolved. There was the ANSI C++ version from pre 1998. Then came C++98, C++03, C++11, C++14, C++17, C++20 and now C++23 is coming later this year. C++11 and following are often called 'modern C++' because of the great changes that occurred in this version compared it the previous version. How things were coded with C++98 are likely to be different from how they would be coded using the latest version of C++.
Unless you have the knowledge, you can't really determine whether code found on the web is 'good' or 'bad', 'old' or 'modern' - or even works as suggested.
If you produce code and post it here then we'll provide advice and guidance. Same if you have a C++ question.
Enjoy and have fun!