⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_36229.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:36229 发表者:夕阳 发表日期:2003-04-13 13:04:40
<br>主题:CString类的函数Format有哪些意思,谁能给我解释一下,我没有找到相关的介绍,vc的函数太多了
<br>内容:CString类的函数Format有哪些意思,谁能给我解释一下,我没有找到相关的介绍,vc的函数太多了<BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:晚风也渡 回复日期:2003-04-13 13:49:33
<br>内容:查看MSDN
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:wangwt 回复日期:2003-04-14 11:00:33
<br>内容:str.Format(_T("Left-justified integer: %.6d\n"), 35);<BR><BR>str="Left-justified integer: 35"<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:林建华 回复日期:2003-04-14 12:59:40
<br>内容:Format Specification Fields: printf and wprintf Functions<BR>A format specification, which consists of optional and required fields, has the following form:<BR><BR>%[flags] [width] [.precision] [{h | l | I64 | L}]type<BR><BR>Each field of the format specification is a single character or a number signifying a particular format option. The simplest format specification contains only the percent sign and a type character (for example, %s). If a percent sign is followed by a character that has no meaning as a format field, the character is copied to stdout. For example, to print a percent-sign character, use %%.<BR><BR>The optional fields, which appear before the type character, control other aspects of the formatting, as follows:<BR><BR>type<BR><BR>Required character that determines whether the associated argument is interpreted as a character, a string, or a number (see Table R.3).<BR><BR>flags<BR><BR>Optional character or characters that control justification of output and printing of signs, blanks, decimal points, and octal and hexadecimal prefixes (see Table R.4). More than one flag can appear in a format specification.<BR><BR>width<BR><BR>Optional number that specifies the minimum number of characters output. (See printf Width Specification.) <BR><BR>precision<BR><BR>Optional number that specifies the maximum number of characters printed for all or part of the output field, or the minimum number of digits printed for integer values (see Table R.5).<BR><BR>h | l | I64 | L<BR><BR>Optional prefixes to type-that specify the size of argument (see Table <BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:理文 回复日期:2003-04-15 23:54:43
<br>内容:就跟printf里的意思一样,只是你的情况把结果写进你的CString里<BR>CString cstr;<BR>int x=100;<BR>cstr.Format("i=%d",x);<BR>运行后cstr的内容为"i=100"
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:knasia 回复日期:2003-04-20 12:24:29
<br>内容:那怎么把Cstring的内容传到x里<BR><BR>我太菜<BR>不要见笑
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -