OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83636c3
)
Update index.md
author
Ir1dXD
<sirius.caffrey@gmail.com>
Sun, 25 Nov 2018 11:31:28 +0000
(19:31 +0800)
committer
GitHub
<noreply@github.com>
Sun, 25 Nov 2018 11:31:28 +0000
(19:31 +0800)
docs/string/index.md
patch
|
blob
|
history
diff --git
a/docs/string/index.md
b/docs/string/index.md
index
e01d40c
..
61376ef
100644
(file)
--- a/
docs/string/index.md
+++ b/
docs/string/index.md
@@
-25,3
+25,9
@@
- 字符串字面量:它们的值在编译过程中已经确定,保存在可执行目标文件的 `.rodata` 段内。
调用 `objdump -s -j .rodata 文件名` 可以查看 `.rodata` 段的具体内容。
- 字符数组、`vector`、`string`:局部变量保存在栈中,全局变量若初始化了保存在可执行目标文件的 `.data` 段内,若未初始化保存在 `.bss` 段。
+ ```c++
+ char rank[233];
+ // rank 在 .bss 段
+ char buf[233] = {0};
+ // buf 在 .data 段
+ ```