Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstr.h>
- char fstr_[FSTR_LEN];
- char* fstr(const char* fmt, ...){
- va_list args;
- va_start(args, fmt);
- vsprintf_s((char*)fstr_, FSTR_LEN-1, fmt, args);
- va_end(args);
- fstr_[FSTR_LEN-1]=0; //just in case
- return (char*)fstr_;
- }
- #ifndef FSTR_NO_WCHAR
- wchar_t fstrw_[FSTRW_LEN];
- wchar_t* fstrw(const wchar_t* fmt, ...){
- va_list args;
- va_start(args, fmt);
- vswprintf_s((wchar_t*)fstrw_, (FSTRW_LEN/sizeof(wchar_t))-1, fmt, args);
- va_end(args);
- fstrw_[(FSTRW_LEN/sizeof(wchar_t))-1]=0;
- return (wchar_t*)fstrw_;
- }
- #endif /* FSTR_NO_WCHAR */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement