的sizeof(炭) [英] sizeof(char)
本文介绍了的sizeof(炭)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一本C书,说明char的大小是一个字节。这对于
C ++是否正确?
解决方案
" nsgi_2004" <无**** @ nospam.com>在消息中写道
新闻:X1xvc.42929
mm1.41139@fed1read06 ...我有一本C书说char的sizeof是一个字节。对于
C ++来说这是真的吗?
是。
" nsgi_2004" <无**** @ nospam.com>写了...我有一本C书,说明char的大小是一个字节。对于
C ++来说这是真的吗?
sizeof(char)总是1,是的。 ''char''和''byte''在大小相关时是C和C ++中的同义词。
V
I have a C book that says the sizeof a char is one byte. Is this true for
C++?
解决方案
"nsgi_2004" <no****@nospam.com> wrote in message
news:X1xvc.42929
mm1.41139@fed1read06...I have a C book that says the sizeof a char is one byte. Is this true for
C++?
Yes.
"nsgi_2004" <no****@nospam.com> wrote...I have a C book that says the sizeof a char is one byte. Is this true for
C++?
sizeof(char) is always 1, yes. ''char'' and ''byte'' are synonyms in
both C and C++ when sizes are concerned.
V
这篇关于的sizeof(炭)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文