字符串类问题 [英] string class problem
问题描述
任何人都可以告诉我一个解决方案:
i不能使用标准c ++字符串中的功能包括
string.h文件,但仍然无效。
can anyone tell me a solution:
i cannot use the features in standard c++ string classgh i included
the string.h file but still its not working.
推荐答案
2007年6月25日星期一09:15:45 -0700,mann_mathann写道:
On Mon, 25 Jun 2007 09:15:45 -0700, mann_mathann wrote:
任何人都可以告诉我一个解决方案:
i不能使用标准c ++字符串中的功能我包含了
string.h文件,但仍然无法正常工作。
can anyone tell me a solution:
i cannot use the features in standard c++ string classgh i included the
string.h file but still its not working.
使用类std :: string
#include< string>
注意:string.h包含标准C的头文件(而不是C ++)
字符串操作例程。如果你需要在C ++中使用这些(如果你使用std :: string,那么你很可能没有
)那么你应该通过
包含它们< cstringrather而不是string.h。
-
Lionel B
To use the class std::string
#include <string>
Note: string.h contains headers for the standard C (as opposed to C++)
string manipulation routines. If you need these in C++ (and chances are
you don''t if you''re using std::string) then you should include them via
the header <cstringrather than string.h.
--
Lionel B
ma ********** @ yahoo.co.in 写道:
任何人都可以告诉我一个解决方案:
i不能使用标准c ++字符串中的功能我包括
string.h文件,但仍然无法正常工作。
can anyone tell me a solution:
i cannot use the features in standard c++ string classgh i included
the string.h file but still its not working.
因为< string.his C90标题(C ++等价物是< cstring>)。尝试
使用< string(注意缺少.h)并且不要忘记std :: when
使用std :: string。
Because <string.his the C90 header (C++ equivalent is <cstring>). Try
using <string(note the lack of .h) And don''t forget the std:: when
using std::string.
ma ********** @ yahoo .co.in 写道:
任何人都可以告诉我一个解决方案:
i不能使用标准c ++字符串中的功能我在string.h文件中包含
但仍无法正常工作。
can anyone tell me a solution:
i cannot use the features in standard c++ string classgh i included
the string.h file but still its not working.
因为文件名为< stringnot< string.h> ;
john
Because the file is called <stringnot <string.h>
john
这篇关于字符串类问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!