The more you use something, the more you'll memorize it.
Think of it as learning a spoken language. You will probably need to look up words or whole phrases all the time, but as you use it more and more, you'll simply remember and memorize things. With programming, it's a lot easier and faster to memorize and learn than learning a new spoken language.
However, no matter how good someone gets, learning a new language means googling syntax and such.
Learncpp.com -> best learning tool I can show anyone for intro to programming and C++.
also below why do people write
std::Insert here
instead of "using namespace std;" |
You shouldn't use "using namespace std", it's bad practice. It basically says, "I may be using things from the std namespace without saying so"
However, this means that you can have naming conflicts. Imagine you create a function with a specific name while there exists a similar function with the same name in the std:: namespace. Which function gets called? If the wrong function was being called, would you realize it?
I've gotten shot in the foot from "using namespace std" plenty of times before. Usually, it isn't a problem for simple programs, but I've had friends doing simple coding assignments for their professors who ran into issues. They can't figure out what's wrong, and simply removing "using namespace std" fixes their code.
I once was running a quick program I made which wouldn't work. After several minutes of confusion, I simply removed "using namespace std" and it worked - like magic. A function I thought was using was never called - instead its std:: counterpart was being called and ruined everything.
There are vast things in the std:: namespace, and you can't avoid name conflicts for long.
EDIT: You can read here about using namespace std:
https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice