| www.delorie.com/djgpp/doc/libc-2.01/libc_606.html | search |
#include <string.h> char * strdup (const char *source);
Returns a newly allocated area of memory that contains a duplicate of the string pointed to by source. The memory returned by this call must be freed by the caller.
Returns the newly allocated string, or NULL if there is no more memory.
char *foo()
{
return strdup("hello");
}
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |