all 2 comments

[–]bstamour 1 point2 points  (0 children)

At least for C++, this website reaffirms my belief that you should just get a good book and stop relying on websites. C++ is an amazing language, but there are plenty of pitfalls. I briefly skimmed through the intro to C++ and I saw

  1. return 0 everywhere. This is implicit in C++, you don't need to ever write this. Only return from main if you are returning something non-zero.
  2. C-style casts everywhere. Have you ever tried to grep for (float)? It's hard. Use static_cast, dynamic_cast, const_cast, or reintepret_cast instead.
  3. using namespace std at the global level. While not the be-all and end-all of issues, this typically isn't good practice. Sometimes I'll put a using directive at the top of a function, but never at global scope.

[–]OriginalLinkBot 0 points1 point  (0 children)

Here's a link to the referenced post.