Better C++ Coding Tips

0
39

To write better C++ code try to use following tips

  • Use smart Pointers instead raw pointers
  • Use smart Objects instead normal objects
    • Thread controlling variables
    • File handlers
    • Database connection
    • Pointers
  • Keep only required function public, rest all functions are to be kept private
  • received arguments const if you are not modifying it
  • Use Rule of 3 or 5. Do create copy and move versions of constructor and assignment along with destructor
  • Use Design Patterns
Previous articleUseful Parenting Links
Next articleHealthy Millet Pancake | Uthappam
Vishal Bhandari is an admin, editor and writer of this portfolio. He writes about himself, his interests, hobbies, activities. He manages many articles about tech, finance, history and geopolitics on his portfolio.

LEAVE A REPLY

Please enter your comment!
Please enter your name here