Quote:Original post by Bbalstrzmj90
thanks guys. I think I'll develop my own style as long as theres nothing wrong with it. And for now I'll still "use" using namespace std. And I'll also start working on the way to declare classes.
AFAICS, there is nothing wrong with a "using namespace std". I have read (in Scott Meyers' excellent "Effective C++" and "More Effective C++") that including using directives in your header files effectively defeat the purpose of the namespace, because the directive exposes the entire contents of the namespace anywhere the header is included. My guess is that this is what this meme refers to. Putting a "using" directive in appropriate .cpp files keeps the encapsulation of the namespace intact, but simplifies your work where needed.
=-=-=-=
I personally have developed software with and without hungarian notation. These days I don't recommend it, and I prefer to work without it.
Code style is important to me for these reasons:
-- Being able to understand what you wrote now
-- Being able to understand what somebody else wrote now
-- Being able to understand what you wrote a long time ago
-- Being able to understand what somebody else wrote a long time ago
Having worked on teams of various sizes, with various degrees of coding standards, I recommend that you find some styles that:
-- make your work easier
-- you can remember easily
-- you and whoever else you work with can agree on
Good luck!