3 ms·
I have been checking the code for the generation of the spheres. I never developed C++ professionally. Is this code considered good C++ practice? I mean I saw "
by dsaravel 13y ago
I have been checking the code for the generation of the spheres. I never developed C++ professionally. Is this code considered good C++ practice? I mean I saw "using namespace std", and exceptions using cout.
- seabrookmx 13y agoIf it's just a simple demo app, I probably wouldn't use it as a example of good C++ practice. Many C++ devs have a different idea on what idiomatic C++ should look like. C++11 really shakes things up as well. There's no reason a "using namespace std;" is bad, as long as it isn't in the header. If it's in the header file, every file that includes that header will have it's namespace polluted with std declarations, and this leads to a big nasty chain of potential name conflicts (one header file includes another and so on and so forth).
- dsaravel 13y agoRight, it makes perfect sense. Thanks for that.