Redian新闻
>
a small question about c++ object allocation
avatar
a small question about c++ object allocation# JobHunting - 待字闺中
t*t
1
【 以下文字转载自 Indiana 讨论区 】
发信人: taccat (Yixi), 信区: Indiana
标 题: Lady Gaga Cake
发信站: BBS 未名空间站 (Wed Sep 8 15:06:33 2010, 美东)
Lady Gaga birthday cake
four Chiffon cake layers with banana-flavor cream in between, covered with
marshmallow fondant and picture drawed with butter-flavor sugar icing and
mini M&M.
没来得及更细致的装饰。时间比较紧张。
avatar
S*Y
2
I have a class A with a public static member
class A{
...
public:
static int i;
private
int j,k;
char* s;
....
}
in the main program, I have
A a1;
I understand that a1 will be in stack, a1's j, k will be in stack too; s wil
l point to a dynamically allocated heap(if new-ed).
but how about the static variable i? It belongs to class A. Will it be in th
e data section?
Thanks a lot.
avatar
d*2
3
哈哈,终于lady gaga刮到了food版。
avatar
a*s
4
Yes, it will be in the data segment, not in the stack.
avatar
e*a
5
我喜欢这个

【在 t****t 的大作中提到】
: 【 以下文字转载自 Indiana 讨论区 】
: 发信人: taccat (Yixi), 信区: Indiana
: 标 题: Lady Gaga Cake
: 发信站: BBS 未名空间站 (Wed Sep 8 15:06:33 2010, 美东)
: Lady Gaga birthday cake
: four Chiffon cake layers with banana-flavor cream in between, covered with
: marshmallow fondant and picture drawed with butter-flavor sugar icing and
: mini M&M.
: 没来得及更细致的装饰。时间比较紧张。

avatar
S*Y
6
thanks.

【在 a**********s 的大作中提到】
: Yes, it will be in the data segment, not in the stack.
avatar
Y*n
7
hahahaha 这个太Q了~~~~~~赞翻糖盖戚风的!!!
avatar
R*s
8
不错, 很可爱 :)
avatar
E*A
9
太可耐了
avatar
l*3
10
好可爱啊,真喜欢
avatar
b*M
11
哈哈哈,太有才了

【在 t****t 的大作中提到】
: 【 以下文字转载自 Indiana 讨论区 】
: 发信人: taccat (Yixi), 信区: Indiana
: 标 题: Lady Gaga Cake
: 发信站: BBS 未名空间站 (Wed Sep 8 15:06:33 2010, 美东)
: Lady Gaga birthday cake
: four Chiffon cake layers with banana-flavor cream in between, covered with
: marshmallow fondant and picture drawed with butter-flavor sugar icing and
: mini M&M.
: 没来得及更细致的装饰。时间比较紧张。

avatar
t*t
12
嘻嘻,谢谢。
这样配,既好吃,又好看。
我不太喜欢sugar icing,我喜欢鲜奶油。但是鲜奶油不容易做好看的花。所以只能用
sugar icing裱花,用奶油夹层。嘻嘻。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。