没有构造函数的实例“AcademicStaff :: AcademicStaff”匹配参数列表 [英] no instance of constructor "AcademicStaff::AcademicStaff" matches the argument list
本文介绍了没有构造函数的实例“AcademicStaff :: AcademicStaff”匹配参数列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我宣布了
AcademicStaff(int, char *, char *, int , char *, char *,int, char *,char *)
initiliazing的构造函数。
constructor for initiliazing.
当我主要调用函数时出现错误
When I called the functiion in main I got an error
" 2 IntelliSense: no instance of constructor "AcademicStaff::AcademicStaff" matches the argument list
argument types are: (int, char, char, int, char, char, int, char, char)".
调用函数:
AcademicStaff headOdDepartment(staffID, *firstName, *lastName, telNo, *address, *email, annualSalary, *title, *status);
myDepartment.setheadOfDepartment(headOdDepartment);
推荐答案
您需要调用 AcademicStaff headOdDepartment(staffID,firstName,lastName,telNo,address,email,annualSalary,title,status);
如果您发送 * charArray
。
这篇关于没有构造函数的实例“AcademicStaff :: AcademicStaff”匹配参数列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文