Hi ,
i have advice on the folloing code:
wchar_t* day = new wchar_t [11];
swprintf(day,L"%4d-%2d-%2d",yy,mm,dd);
how to make sure that my 'day' didn't get string bigger then 20 chars?
found:
swnprintf_s(day,size,L"%4d-%2d-%2d",yy,mm,dd);
but it requires crt
any suggestions?
~igRek 1 1972 ig****@gmail.com wrote:
Hi ,
i have advice on the folloing code:
wchar_t* day = new wchar_t [11];
swprintf(day,L"%4d-%2d-%2d",yy,mm,dd);
how to make sure that my 'day' didn't get string bigger then 20 chars?
found:
swnprintf_s(day,size,L"%4d-%2d-%2d",yy,mm,dd);
but it requires crt
any suggestions?
Yes. Don't use swprintf. Use a wostringstream instead. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Pete |
last post by:
I have form/select which executes a function using onchange. No
problem. However, when I validate the page with a strict HTML 4.01
doctype at http://validator.w3.org, it demands either an action or...
|
by: D. Alvarado |
last post by:
Hello,
I am trying to open a window containing an image and I would like
the image to be flush against the window -- i.e. have no padding or
border. Can I make this happen with a single call to a...
|
by: WalterR |
last post by:
This is my first time here, so there may be earlier relevant threads of
which I am unaware. Though my experience with DB2 is not extensive,
such as it is was under OS/390 or equ. My main...
|
by: ankursinha |
last post by:
Hi,
Is it possible to write a C program that prints "Hello World" on screen without
having a single semi-colon in the entire program?
The extra constraint here is that u r not allowed to use...
|
by: Ralf Gedrat |
last post by:
Hello!
I have some Vb.Net applications, which are terminated at indefinite times
without message.
If I call in the program regulated system.GC.Collect, then the program is
terminated here...
|
by: ig3v10 |
last post by:
Hi ,
i have advice on the folloing code:
wchar_t* day = new wchar_t ;
swprintf(day,L"%4d-%2d-%2d",yy,mm,dd);
how to make sure that my 'day' didn't get string bigger then 20 chars?
found:
|
by: Rui Maciel |
last post by:
I've just noticed that the swprintf() function is declared differently in
some platforms. As far as I know, GCC declares that function as
int swprintf(wchar_t *s, size_t n, const wchar_t *format,...
|
by: mmcd79 |
last post by:
I built a VB.net application that makes use of a machine level DB
connection string setting, and a user level starting location setting.
The machine level setting and the default user based...
|
by: Jonathan Kay |
last post by:
Hi,
I'd like to my WCF webservice to work both on SSL and without. Unfortunately searching has
led to dead ends, references to changes that only work on the old previous beta versions and
I...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |