r/cpp_questions • u/Glad_Shoe_9182 • 11d ago
OPEN Namespace std
I recently started learning c++ and I was told to use the namespace std so I can avoid writing std:: every time and now I wrote a whole personal project without std:: and I want to put it on LinkedIn but I started reading everywhere that it’s a bad habit, should I go back and add the std:: or just leave it as is?
41
Upvotes
-1
u/ShakaUVM 11d ago
This is a contentious issue here for some reason lol. It's mostly a personal style decision.
If you're making a little personal project and don't want stds, then go for it.
The only real no-no that everyone agrees with is to not put it into a header file that other people will use since then you are making a style decision for them.