C++ 中提示Undefined GetLength( ) 是什么意思 ?

来源:百度知道 编辑:UC知道 时间:2024/05/07 11:35:37
C++ 中提示Undefined GetLength( ) 是什么意思 ?
头文件是#include <string.h>吧 已经包含了
可以别这么笼统吗 小可比较菜 呵呵 先谢谢各位了啊

GetLength 没有被定义
GetLength( ) 好象是JAVA里的写法吧
C++里取长度貌似不是这个
记不清楚了,改小写看看

c++中取字符串长度的函数是:strlen()
头文件是 #include <string.h>

晕~~
给你个例子~~
#include <string.h>
#include <iostream.h>
{
string str='fasdfasdasd';
cout<<strlen(str);
}

结果是:11

获取长度的这个函数未被定义,检查是否包含头文件