tags:

views:

35

answers:

2

Hi, This file String.h

i found while searching about string.h. Where i can find functions implementation of functions defined in string.h i.e [say] source code of "void *memcpy(void *, const void *, size_t); " Also i want to ask how to make ur functions as an interface with its implmentation hidden from developer as string.h functions has.

A: 

Put your function declarations in a .h file and your implementation in a .c file. Compile the .c file into a .o file (.obj on Windows) and link it together with your code.

For the implementation of string.h functions, get the GNU libc source.

Marcelo Cantos
Thanks.Why do we use _PROTOTYPE e.g._PROTOTYPE( void *memset, (void *_s, int _c, size_t _n) I saw it in MINIX3 source codehttp://www.minix3.org/doc/AppendixB.html
mohit
@mohit, that's a different question, start another thread.
Hans Passant
+2  A: 

I usually use Google Code Search to look up the implementation of standard library functions. For example, the implementation of memmove

Eli Bendersky
I would like to up-vote this several times. Great!
Gauthier