Dave's Brain

Browse - programming tips - where is sntprintf defined

Date: 2011apr12
Platform: Windows
Language: C/C++

Q.  Where is _sntprintf(...) defined?

A.  In tchar.h

So do:

	#include <tchar.h>		// For _sntprintf

	...

	char	buf[100];

	_sntprintf(buf, sizeof(buf), _T("%d.%d.%d.%d"), 1, 2, 3, 4);
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Advertisements: