Little Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • unknownbomb
    New Member
    • Nov 2006
    • 26

    Little Error

    Ok ty.

    Now this: 1>e:\documents and settings\user\d esktop\d3d_star terkit_v3.0b\d3 d8\main.cpp(125 ) : error C2660: '_vsnprintf_s' : function does not take 4 arguments


    Code:
    Code:
    void __cdecl add_log (const char *fmt, ...)
    {
    	if(ofile != NULL)
    	{
    		if(!fmt) { return; }
    
    		va_list va_alist;
    		char logbuf[256] = {0};
    
    		va_start (va_alist, fmt);
    		_vsnprintf_s(logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
    		va_end (va_alist);
    
    		ofile << logbuf << endl;
    	}
    }
    Can some1 give me the edited code of this so this error is fixed??
    Thanks!
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    I don't know what '_vsnprintf_s' is but most certainly it doesn't take 4 parameters.
    Check your docs and the prototype declaration of that function.

    kind regards,

    Jos

    Comment

    Working...