I have been at this for a few hours over the past couple of days and search as best as I could online for an answer to this and I am stuck. Just when I think MSDN has an answer for me, I still get a problem. I have a header InstalledPrograms.h
with class InstalledProgram{}
.
Three Constructors
#ifdef CONSTRUCTOR
InstalledProgram::InstalledProgram();
InstalledProgram::InstalledProgram(String^ p_DisplayName);
InstalledProgram::InstalledProgram(String^ p_DisplayName, String^ p_ParentDisplayName, string p_Version);
#endif
I declare the list: list<InstalledProgram> ProgramList;
Pass it to this function:
list<InstalledProgram> InstalledProgram::GetUserUninstallKeyPrograms(RegistryKey ^CurUserInstallKey, RegistryKey^ HkeylmRoot, list<InstalledProgram> paramProgramList)
like this
GetUserUninstallKeyPrograms(Wow64UninstallKey, ClassKey, ProgramList);
Do some stuff and I get to a point in the code that I need to insert a new instance into the list:
paramProgramList.insert(paramProgramList.end(), new InstalledProgram(Name));
The Problem I have having is that the "." before insert shows "No instance of overloaded function matches the argument list", and the Parentheses around InstalledProgram(Name)
show "No
instance of constructor for argument type (System::String ^)".
I don't understand why.
Any help would be appreciated.