It turns out when we call string a string, we're really referring not to those characters but to the address, the location and memory of those characters.
当我说字符串时,我并不是指这些字符集,而是指地址,就是这些字符集在存储器中的位置。
0 And we'll also see backslash 0 which is actually the special character that's used at the end of a string to say no more string after this point in memory.
还有0,用于存储器中字符串末尾,表示在此之后就,没有字符了。
Well, get string again is returning the address of the string the user typed in, D the address of the very first character like the letter D and storing that address in this variable s1.
好的,GetString返回的是,用户输入的字符串的地址,第一个字符的地址,比如字母,然后把这个地址存储在这个变量s1中。
I'm going to delete that arrow and actually draw s2 as pointing to this chunk of memory because whereas before this sequence of chars might have lived at address 71 or whatever, well, this one might live at 91.
我不会把那个箭头删除,实际上我画了s2作为,这块内存的指针,因为,这个字符序列存储在地址71或其它的地方,这个可能存储在91的地方。
应用推荐