And when we return the string to you we're essentially telling you where this chunk of memory is.
当我们返回该字符串时,我们实际上是告诉你,这块存储单元位于哪里。
It's just a chunk of characters back to back to back so this is storing at the very first location in the string what?
它只是一串紧邻的字母串,所以它把什么存储在,字符串的第一个地址下?
So, certainly the CS50 Library designed to be dynamic and, in fact, any time you call get string, we are, in fact, ; allocating a chunk of RAM but it's not coming from the stack; it's actually coming from this portion of memory called the heap.
所以,Cs50库是动态设计的,实际上,每次你调用GetSting时,我们分配一块内存,但它不是来自栈;,而是来自于叫做堆的,内存的一部分。
应用推荐