error C2664: 'setStartupDirectory' : cannot convert parameter
Please support our C++ advertiser: Programming Forums
Thread Solved
![]() |
•
•
Posts: 46
Reputation:
Solved Threads: 0
Hi
I have a virtual function setStartupDirectory()
virtual bool setStartupDirectory(const SysString &sStartupDirectory) = 0;
When I am calling this function
setStartupDirectory((const SysString &)m_pApplicationFolderNarrow);
I am getting this error
Error 2 error C2664: 'setStartupDirectory' : cannot convert parameter 1 from 'const SysString' to 'const SysString &'
Am I missing something
I have a virtual function setStartupDirectory()
virtual bool setStartupDirectory(const SysString &sStartupDirectory) = 0;
When I am calling this function
setStartupDirectory((const SysString &)m_pApplicationFolderNarrow);
I am getting this error
Error 2 error C2664: 'setStartupDirectory' : cannot convert parameter 1 from 'const SysString' to 'const SysString &'
Am I missing something
Here..
c++ Syntax (Toggle Plain Text)
virtual void CSample1::Sample(SysString str) ( if(str.empty()) return; //... ) virtual void CSample2::Sample(SysString &str) { str="what's up"; } int main() { SysString str1="check"; SysString str2; CSample1 s1; CSample2 s2; s1.Sample(str1); s2.Sample(str2); return 0; }
Last edited by cikara21 : Dec 5th, 2008 at 2:26 am.
![]() |
Other Threads in the C++ Forum
- Previous Thread: Can someone help me.
- Next Thread: Can someone please correct my pseudo code assignment? I'm new to this language.
•
•
•
•
Views: 290 | Replies: 3 | Currently Viewing: 1 (0 members and 1 guests)





Linear Mode