读书人

怎么能看到string类里的成员

发布时间: 2012-02-06 15:52:44 作者: rapoo

如何能看到string类里的成员
如何能看到string类里的成员,不用MSDN

[解决办法]
你还是装个msdn吧。string的成员函数太多了,没帮助文档很容易用错的。
[解决办法]
下个函数速查
http://download.csdn.net/source/249072
[解决办法]
string定义在xstring里面
用记事本直接打开xstring(在vc98/include里面), Ctrl+F找到basic_string开始阅读。
[解决办法]
1) csdn

2) 直接找源文件看
[解决办法]

msdn

Reference
Typedefs
string
A type that describes a specialization of the template class basic_string with elements of type char as a string.

wstring
A type that describes a specialization of the template class basic_string with elements of type wchar_t as a wstring.

Operators
operator!=
Tests if the string object on the left side of the operator is not equal to the string object on the right side.

operator==
Tests if the string object on the left side of the operator is equal to the string object on the right side.

operator <
Tests if the string object on the left side of the operator is less than to the string object on the right side.

operator < <
A template function that inserts a string into the output stream.

operator <=
Tests if the string object on the left side of the operator is less than or equal to the string object on the right side.

operator>
Tests if the string object on the left side of the operator is greater than to the string object on the right side.

operator> =
Tests if the string object on the left side of the operator is greater than or equal to the string object on the right side.

operator> >
A template function that extracts a string from the input stream.

operator+
Concatenates two string objects.

Specialized Template Functions
swap
Exchanges the arrays of characters of two strings.

Functions
getline
Extract strings from the input stream line by line.

Classes
basic_string Class
A template class that describes objects that can store a sequence of arbitrary character-like objects.

char_traits Class
A template class that describes attributes associated with a character of type CharType

Specializations
char_traits <char> Class
A class that is a specialization of the template class char_traits <CharType> to an element of type char.

char_traits <wchar_t> Class
A class that is a specialization of the template class char_traits <CharType> to an element of type wchar_t.


See Also

[解决办法]
去买个msdn db盘吧


读书人网 >C++

热点推荐