Example: strcpy

The following example uses strcpy to copy the string "c:\\tmp" to the character array fullpath.

The example then appends a backslash and filename to fullpath.

    #include <string.h>
    char fullpath[1024], * filename = "logfile.txt";
    strcpy(fullpath, "c:\\tmp");
    lr_output_message ("fullpath after strcpy: %s", fullpath);
    strcat(fullpath, "\\");
    strcat(fullpath, filename);
    lr_output_message ("Full path of file is %s", fullpath);}
Action.c(6): fullpath after strcpy: c:\tmp
Action.c(10): Full path of file is c:\tmp\logfile.txt