sprintf(str,"%s",str1);
sprintf(str,"%S",str1);
%s,%S这两个有什么不同吗?
sprintf(str,"%S",str1);
%s,%S这两个有什么不同吗?
解决方案 »
- 求助:SMI中切分窗口的问题
- 如何使创建的线程和主线程具有同样的安全特性?
- 世上有没有真正的vc++6.0中文版?
- GRPS通讯的疑问?急!急!!急!!!
- 水晶报表使用问题。 没有 创建报表API 许可证
- 在对话框中用这样输出文字为何无显示?
- 求《Programming Server-Side Applications for Microsoft Windows 2000》(Jeffrey Richter著)
- udpclient接收的数据存储问题
- vc++6.0,怎么获取系统打印机的状态(我只想知道打印完成),打印完成我程序好做后面的事,我是xp系统
- WinSock的问题,请诸位帮帮忙!
- “新建”对应的消息是什么?如何在程序中发送这样一个消息?
- 三言两语。。。
c, C The precision has no effect. Character is printed.
d, i, u, o, x, X The precision specifies the minimum number of digits to be printed. If the number of digits in the argument is less than precision, the output value is padded on the left with zeros. The value is not truncated when the number of digits exceeds precision. Default precision is 1.
e, E The precision specifies the number of digits to be printed after the decimal point. The last printed digit is rounded. Default precision is 6; if precision is 0 or the period (.) appears without a number following it, no decimal point is printed.
f The precision value specifies the number of digits after the decimal point. If a decimal point appears, at least one digit appears before it. The value is rounded to the appropriate number of digits. Default precision is 6; if precision is 0, or if the period (.) appears without a number following it, no decimal point is printed.
g, G The precision specifies the maximum number of significant digits printed. Six significant digits are printed, with any trailing zeros truncated.
s, S The precision specifies the maximum number of characters to be printed. Characters in excess of precision are not printed. Characters are printed until a null character is encountered
我自己试试吧
UINT CodePage, // code page
DWORD dwFlags, // character-type options
LPCSTR lpMultiByteStr, // string to map
int cbMultiByte, // number of bytes in string
LPWSTR lpWideCharStr, // wide-character buffer
int cchWideChar // size of buffer
);
sprintf,strcpy,TRACE()等。其实大家试一下就可以了。这个问题还是挺麻烦的。