当前位置: 首页 > news >正文

电商网站设计规划书seo网站排名优化教程

电商网站设计规划书,seo网站排名优化教程,金山做网站公司,整站优化昌吉可以吗?在本文中将讲述printf/wprintf/CString.Format等相关函数所使用的格式化输出的语法。 函数中格式化声明的一般格式为: %[flags] [width] [.precision] [{h | l | ll | I | I32 | I64}]type 其中的每一个蓝色项都代表了格式化输出格式中的一个选项。这些输出格式选项…

在本文中将讲述printf/wprintf/CString.Format等相关函数所使用的格式化输出的语法。

函数中格式化声明的一般格式为: 

%[flags] [width] [.precision] [{h | l | ll | I | I32 | I64}]type

其中的每一个蓝色项都代表了格式化输出格式中的一个选项。这些输出格式选项一般使用一个字母或者一个数字来表示特定的格式;该格式说明语句最简单的形式就是百分号%加上一个类型说明符type,例如%s。如果%后跟的字符并非type类型的选项之一,那么这个字符将以文本的形式输出。例如在输出百分号时所采用的语句%%。

出现在type之前的其他选项都分别控制了格式化输出的其他方面,具体如下:

type该选项需要一个字符来确认要输出的参数是以字符的形式输出,还是以字符串的形式输出,或者只是输出一个数字;详细参见本文附录1。
flags它由一个或者若干个字符组成。它控制了输出的对齐方式、正负号、小数点、空白字符和十进制或者是十六进制的前缀等。多个flag可同时出现在同一输出格式控制语句中。
width一个数字;用来说明输出的最小位数。
precision一个数字;用来说明全部输出字符的或者部分输出字符的最大位数。对于整型,该项限定了输出数字的最少个数。
h| l| ll| I| I32| I64用来表示输出参数size的前缀(long/short, 32-/64-bit, single-byte字符/宽字符)。详细参见本文附录2。
一种良好的编程习惯:  在编写程序的时候,不要在程序中出现类似于printf(name)的语句。虽然该语句在C语言中输出name这个字符串,但是实际上这是很危险的。如果name字符串中包含了“%s”,那么该语句将会在运行时失败。应该将该语句写为printf("%s",name);这样的语句才是安全的。
附录1:类型说明符type
注意:类型说明符 C, n, pS的行为, 还有c和sprintf函数中的行为,都是Microsoft的扩展,与ANSI标准不兼容。

character

Type

Output format

c

int or wint_t

用在printf函数中,表示的是一个single-byte字符;而用在wprintf函数中,表示的是一个宽字符。

C

int or wint_t

用在wprintf函数中,表示的是一个single-byte字符;而用在printf函数中,表示的是一个宽字符。(与c刚好相反)

d

int

有符号十进制整数  

i

int

有符号十进制整数

o

int

八进制无符号整数

u

int

无符号十进制整数

x

int

无符号十六进制整数,使用"abcdef"标识。

X

int

无符号十六进制整数,使用"ABCDEF"标识。

e

double

有符号值,输出形式为[ – ]d.dddd e [sign]dd[d]。其中d是一个十进制的数字,其范围为0-9;dddd是一个或者多个十进制的数字。dd[d]是两个或者三个十进制的数字。其值依赖于输出的格式和指数的大小。符号是+、-。

E

double

和e相似,只是将输出中的e用E代替。

f

double

有符号值,输出形式为[-]dddd.dddd。小数点前面的数字由输出值的大小决定。而小数点后面的数字由输出的精度决定。

g

double

Signed value printed in f or e format, whichever is more compact for the given value and precision. The e format is used only when the exponent of the value is less than –4 or greater than or equal to the precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it.

G

double

Identical to the g format, except that E, rather than e, introduces the exponent (where appropriate).

a

double

有符号双精度十六进制浮点数。输出形式为[−]0xh.hhhh dd。precision选项将决定小数点后面的位数。(using lower case letters)

A

double

有符号双精度十六进制浮点数。输出形式为[−]0xh.hhhh dd。precision选项将决定小数点后面的位数。(using capital letters)

n

Pointer to integer

Number of characters successfully written so far to the stream or buffer; this value is stored in the integer whose address is given as the argument. See Security Note below.

p

Pointer to void

以十六进制的形式输出地址

s

String

当和printf函数使用的时候,输出的是single-byte字符串。而和wprintf使用的时候输出的是宽字符串;会依次输出所有字符知道遇到第一个null字符或者由precision值限定;

S

String

当和wprintf函数使用的时候,输出的是single-byte字符串。而和printf使用的时候输出的是宽字符串;会依次输出所有字符知道遇到第一个null字符或者由precision值限定;

Note:如果和%s或者%S相关的参数是一个null指针,将会输出“(null)”.

Note在所有的指数格式中,默认的指数位数为3位;可以利用函数_set_output_format设定输出的位数为2,然后输出会根据需要扩展到3位。

Security Note: %n格式符是不安全的,在默认情况下是被禁用的;利用_set_printf_count_output函数可以启用该功能。

附录2

The optional prefixes to type, h, l, I, I32, I64, and ll specify the "size" of argument (long or short, 32- or 64-bit, single-byte character or wide character, depending upon the type specifier that they modify). These type-specifier prefixes are used with type characters in printf functions or wprintf functions to specify interpretation of arguments, as shown in the following table. These prefixes are Microsoft extensions and are not ANSI-compatible.

NOTE:

The h and l prefixes are Microsoft extensions when used with data of type char.

To specify

Use prefix

With type specifier

long int

l (lowercase L)

d, i, o, x, or X

long unsigned int

l

o, u, x, or X

long long

ll

d, i, o, x, or X

short int

h

d, i, o, x, or X

short unsigned int

h

o, u, x, or X

__int32

I32

d, i, o, x, or X

unsigned __int32

I32

o, u, x, or X

__int64

I64

d, i, o, x, or X

unsigned __int64

I64

o, u, x, or X

ptrdiff_t (that is, __int32 on 32-bit platforms, __int64 on 64-bit platforms)

I

d, i, o, x, or X

size_t (that is, unsigned __int32 on 32-bit platforms, unsigned __int64 on 64-bit platforms)

I

o, u, x, or X

long double

l or L

f

Single-byte character with printf functions

h

c or C

Single-byte character with wprintf functions

h

c or C

Wide character with printf functions

l

c or C

Wide character with wprintf functions

l

c or C

Single-byte – character string with printf functions

h

s or S

Single-byte – character string with wprintf functions

h

s or S

Wide-character string with printf functions

l

s or S

Wide-character string with wprintf functions

l

s or S

Wide character

w

c

Wide-character string

w

s

Thus to print single-byte or wide-characters with printf functions and wprintf functions, use format specifiers as follows.

To print character as

Use function

With format specifier

single byte

printf

c, hc, or hC

single byte

wprintf

C, hc, or hC

wide

wprintf

c, lc, lC, or wc

wide

printf

C, lc, lC, or wc

To print strings with printf functions and wprintf functions, use the prefixes h and l analogously with format type-specifiers s and S.

转载于:https://www.cnblogs.com/cylee025/archive/2011/04/03/2004273.html

http://www.lbrq.cn/news/2794681.html

相关文章:

  • 安徽建网站公司怎样优化关键词到首页
  • 网站怎么做隐藏内容谷歌优化seo
  • wordpress 用户权限分配seo网络营销课程
  • 潍坊哪家做网站做的最好竞价托管推广
  • 上传设计作品的网站郑州网站优化推广
  • 专业网站建设服务报价百度站长工具验证
  • 垦利网页定制seo网站推广计划
  • 青岛 网站维护关键字
  • 怎么做网站内部搜索功能软文广告示范
  • wordpress下拉南宁网站运营优化平台
  • 织梦可以做婚纱影楼网站吗免费seo
  • 网站定制型和营销型广点通和腾讯朋友圈广告区别
  • asp网站qq登录太原seo外包平台
  • 建设购物网站论文网站alexa排名查询
  • 营业推广谷歌seo外链
  • 刚创业 建网站中国新闻今日头条
  • 音乐网站用dw怎么做网络营销比较常用的营销模式
  • 网页设计与网站建设课程报告百度最怕哪个投诉电话
  • 小狗做爰网站搜索引擎提交入口网址
  • 潍坊专业网站建设哪家好广告的六种广告形式
  • 如何在百度做自己公司的网站成都专业网站推广公司
  • 做外贸哪里网站比较好销售渠道都有哪些
  • 网站运营频道内容建设百度行发代理商
  • 网站建设可以入开发成本吗关键字广告
  • 柳州住房和城乡建设部网站必应搜索引擎国际版
  • 一个网站怎么做流量统计网站建设明细报价表
  • 驾校网站建设费用百度推广管理系统
  • 香港做股指网站网络营销软件条件
  • fsockopen wordpress优化方案官方网站
  • 新疆网站制作链接生成器在线制作
  • 从YOLOv5到RKNN:零冲突转换YOLOv5模型至RK3588 NPU全指南
  • 自动驾驶GOD:3D空间感知革命
  • DeepSeek大模型如何重塑AI Agent?从技术突破到行业落地
  • 一种数字相机中的自动曝光算法
  • 运维日常工作100条
  • 心路历程-了解网络相关知识