- If you wish to create an array at run time to store a
character string,
then instantiate the following pattern:
character-pointer variable = new char[character count + 1]
- If you want to use C++'s string-handling functions,
then include the following line in your program:
#include
- If you want to determine the number of characters in a character array,
and you have included
#include <string.h>
in your program,
then instantiate the following pattern:
strlen(name of character array)
- If you want to copy a string from one array into another,
and you have included
#include <string.h>
in your program,
then instantiate the following pattern:
strcpy (name of target array, name of source array);