朋友
在HP框中,当我传递一个字符串对象给函数时,我得到以下错误
错误422:“./header/Handler.h”,第24 # 'string‘行用作类型,但尚未定义为类型。也许在类字符串中,您的意思是“String”
["/opt/aCC/include/SC/String.h", line 66].
int populateBindingHandle(rpc_if_handle_t p_if_spec, string p_cell_name);为什么我要错误地使用String.h
声明字符串newstr是如何实现的;
不同于
字符串新闻;??
非常感谢
发布于 2009-03-12 09:43:54
看起来编译器提到的头中有一个String类。编译器认为你做了一个错误。
如果要使用STL字符串,请使用以下命令:
#include <string>
int populateBindingHandle(rpc_if_handle_t p_if_spec, std::string ...)或者在某个地方有一个using声明:
using std::string;
int populateBindingHandle(rpc_if_handle_t p_if_spec, std::string ...)注意,旧样式的标头已被废弃,即您不应该再使用#include <string.h>。
https://stackoverflow.com/questions/637892
复制相似问题