1. Use std::string instead of char * or char []
  2. Use standard containers instead of homegrown containers
  3. Manage your class data to avoid resource leaks and crashes
  4. Use virtual destructors in class hierarchies
  5. Use smart pointers instead of raw pointers

版权所有 罗明
posted on 2005-08-26 12:18 罗明 阅读(452) 评论(0)  编辑  收藏 所属分类: C++