Monday, June 23, 2008

Library string Type and String Literals

C++ Primer 4/e in 3.2. Library string Type there is a caution:『For historical reasons, and for compatibility with C, character string literals are not the same type as the standard library string type. This fact can cause confusion and is important to keep in mind when using a string literal or the string data type.』
Chinese translation is said:『由於歷史因素和C相容性,字元字串字面常數(character string literals)的型別和C++標準庫的string型別並不相同。這可能會造成困惑。在使用字串字面常數或string型別時,這是一件必須放在心上的重要事情。』
Mm,I am familiar with the usage of the C syntaxs. When I change to use C++, I truly not too understand the differences between them.

achi's Blog

No comments: