小编You*_*air的帖子

C++"调用重载函数是模糊的"编程错误

我在我的代码中面临"模糊调用错误",我无法检测到它我认为错误是在addressBookType类中,但我能够检测到它!

由于这些错误,我不得不重新发布这个问题?"

Compiler: MinGW GCC 4.6.2 32-bit
Executing  g++.exe...
g++.exe "D:\New Folder\Cpp\Assignment 4\q4\main.cpp" -o "D:\New Folder\Cpp\Assignment 4\q4\main.exe"    -I"E:\Program Files\Dev-Cpp\MinGW32\include"  -I"E:\Program Files\Dev-Cpp\MinGW32\include"   -L"E:\Program Files\Dev-Cpp\MinGW32\lib" -L"E:\Program Files\Dev-Cpp\MinGW32\lib" -static-libstdc++ -static-libgcc 
D:\New Folder\Cpp\Assignment 4\q4\main.cpp: In constructor 'addressBookType::addressBookType()':
D:\New Folder\Cpp\Assignment 4\q4\main.cpp:318:34: error: call of overloaded 'addressType()' is ambiguous

D:\New Folder\Cpp\Assignment 4\q4\main.cpp:318:34: note: candidates are:
D:\New Folder\Cpp\Assignment 4\q4\main.cpp:104:1: note: addressType::addressType(std::string, std::string, std::string, std::string)

D:\New Folder\Cpp\Assignment 4\q4\main.cpp:88:3: note: addressType::addressType()
D:\New Folder\Cpp\Assignment 4\q4\main.cpp:318:34: error: call of overloaded 'extPersonType()' is ambiguous

D:\New Folder\Cpp\Assignment 4\q4\main.cpp:318:34: note: candidates are:
D:\New Folder\Cpp\Assignment …
Run Code Online (Sandbox Code Playgroud)

c++

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

c++ ×1