![](/img/trans.png)
[英]Where can I find the implementation of strncpy() function in GCC source code?
[英]Where can I get the source code of string.h; not function prototypes, but implementation of functions
我在搜索string.h
發現了這個。 我在哪里可以找到string.h
定義的函數的源代碼?
即[比較]源代碼
void *memcpy(void *, const void *, size_t);
另外,我想問一下如何使你的函數作為一個接口,其中的implmentation隱藏在開發人員中,就像string.h
函數一樣。
將函數聲明放在.h文件中,將實現放在.c文件中。 將.c文件編譯為.o文件(Windows上的.obj)並將其與代碼鏈接在一起。
對於string.h函數的實現,獲取GNU libc源代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.