Strdup: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{ | {{DISPLAYTITLE:strdup}} | ||
== char *'''strdup'''(const char *s1) == | == char *'''strdup'''(const char *s1) == | ||
strdup is a standard C/C++ function and is useful for '''dup'''licating '''str'''ings to store them off to pointers. Remember to delete the duplicated string once you're done with it. | strdup is a standard C/C++ function and is useful for '''dup'''licating '''str'''ings to store them off to pointers. Remember to delete the duplicated string once you're done with it. | ||
[[Category:Helpers]] | [[Category:Helpers]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 01:08, 30 November 2011
char *strdup(const char *s1)
strdup is a standard C/C++ function and is useful for duplicating strings to store them off to pointers. Remember to delete the duplicated string once you're done with it.