Re: error C2661: 'CStdStr<CT>::Format' : no overloaded function takes 19 argumentswith[CT=char]
- From: "Tom Serface" <tom.nospam@xxxxxxxxxxxxx>
- Date: Wed, 21 Mar 2007 22:43:11 -0700
Hi Shilpa,
If I were you I'd just use a regular CString rather than the CStdString knock-off. I think that would work for you. I'd also still put the _T() macro around the format string just in case.
Tom
"shilpa" <bharatid@xxxxxxxxxx> wrote in message news:1174541456.558976.50390@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 21, 2:04 pm, "shilpa" <bhara...@xxxxxxxxxx> wrote:Hi,
I am getting following error,
error C2661: 'CStdStr<CT>::Format' : no overloaded function takes 19
arguments with[CT=char]
If you have the solution please provide it.
Thanks,
Shilpa
Hi Tom ,
Thanks for your reply
Here is the code,
CStdString sql;
CDyndb db;
CUpdateClass updtclass;
sql.Format("exec pr_StoredProc '%s', '%s', null, '%s', '%s', '%s',
'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s',
'%s'",
updtclass.m_var1,
updtclass.m_var2,
updtclass.m_Srch.var3,
updtclass.m_Srch.var4,
updtclass.m_var5,
updtclass.m_Srch.var6,
updtclass.m_Srch.var7,
var8.GetBuffer(0),
var9.GetBuffer(0),
var10.GetBuffer(0),
var11.GetBuffer(0),
var12.GetBuffer(0),
var13.GetBuffer(0),
var14.GetBuffer(0),
var15.GetBuffer(0),
var16.GetBuffer(0),
updtclass.m_var17,
updtclass.m_var18
);
Total parameters are 18,third one is NULL so total count becomes 19
and
it is giving above mensioned error.
If one var is commented and for that vars '%s' is removed,program
compiles well.
Only error is coming when 19th parameter is added into format
function.
Is there any need to include any .h file related to format command.
Please provide solution.
Thanks,
shilpa
.
- References:
- Prev by Date: Re: error C2661: 'CStdStr<CT>::Format' : no overloaded function takes 19 argumentswith[CT=char]
- Next by Date: Re: SetSockOpt with SO_REUSEADDR parameter
- Previous by thread: Re: error C2661: 'CStdStr<CT>::Format' : no overloaded function takes 19 argumentswith[CT=char]
- Next by thread: Re: error C2661: 'CStdStr<CT>::Format' : no overloaded function takes 19 argumentswith[CT=char]
- Index(es):