Congratulations! You are a March Madness BONUS BUYER!

Enjoy 10% OFF* ALL PURCHASES STOREWIDE or enjoy 30% OFF items with a SKU number lower than 16000 & 30% OFF items from Runtime DNA.

Get an EXTRA 30% OFF** on Featured Horror Animations and Poses

Get an EXTRA 50% OFF** on Featured Horror Places and Things

Offer valid for intended recipient only
* 10% discount DOES apply to Gift Cards and Memberships. **Items must be in cart simultaneously for discount to apply.
[ collapse ]

Total noob question

This is probably going to sound like a total noob question, but why doesn't the sprintf command work with the CSDK?

I included the library, so it should work. Is there possibly a setting I forgot to check in VS?



  • Eric WinemillerEric Winemiller Posts: 64
    edited December 1969


    It works, sounds like a VS thing. I use it for debug stuff all the time.

    #ifdef _DEBUG 
    #include "Windows.h"
    #ifdef _DEBUG
     char temp[80];
     sprintf_s(temp, 80, "releasing  0x%x used by 0x%x on thread 0x%x\n\0", &element;.element, usedBy, GetCurrentThreadId());

  • Eric WinemillerEric Winemiller Posts: 64
    edited December 1969

    Oh, just noticed, i'm using sprintf_s.

  • Titanic401Titanic401 Posts: 0
    edited December 1969

    Actually I just noticed what's wrong from the code you posted. I completely forgot to include "windows.h"!

    Thanks Eric.

Sign In or Register to comment.