Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/127.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ C++;成员函数的使用无效(您是否忘记了';()';?)_C++_Compiler Errors_Containers_Members - Fatal编程技术网

C++ C++;成员函数的使用无效(您是否忘记了';()';?)

C++ C++;成员函数的使用无效(您是否忘记了';()';?),c++,compiler-errors,containers,members,C++,Compiler Errors,Containers,Members,我在编译程序时遇到问题。错误发生在第165-177行。我添加的只是测试字母是否存在,我发现了一个错误,希望你能帮助我! 完整代码 (以下为代码附件) do { cout这些线是你的问题: for (unsigned short i = 0; i <= Cust_FName.length; i++) for (unsigned short i = 0; i <= Cust_LName.length; i++) //

我在编译程序时遇到问题。错误发生在第165-177行。我添加的只是测试字母是否存在,我发现了一个错误,希望你能帮助我! 完整代码

(以下为代码附件)

do
{

cout这些线是你的问题:

for (unsigned short i = 0; i <= Cust_FName.length; i++)
for (unsigned short i = 0; i <= Cust_LName.length; i++)
//                                              ^^

我怀疑
Cust\u LName
std::string
因此,您应该在
长度之后添加
()

Cust_LName.length()

要修复运行时错误,请替换

for (unsigned short i = 0; i <= Cust_FName.length(); i++)
for (unsigned short i = 0; i <= Cust_LName.length(); i++)
Cust_LName.length()