摘要:
explicit is a key word to prevent the constructor to do the implicit type conversionclass String1 {public: String1(int n); // assign n bytes}class String2 {public: explicit String2(int n); // assign n bytes}String1 str1 = 'x'; // OK: 'x' will be converted to int and calls the String1 阅读全文
posted @ 2013-10-18 19:31
LevyFan
阅读(183)
评论(0)
推荐(0)
摘要:
A smart pointer is an abstract data type that stimulates a pointer with additional funationality, such as auto memory deallocation, reference counting, etc. In practise it could be a wrapper around of a regular pointer and forwards all meaningfull operations to the pointerThe simplest smart pointer 阅读全文
posted @ 2013-10-18 11:27
LevyFan
阅读(721)
评论(0)
推荐(0)
浙公网安备 33010602011771号