2.1.2.47 strcat


Description

Append a string.

Syntax

LPSTR strcat( LPSTR lpString1, LPCSTR lpString2 )

Parameters

lpString1
[modify] Pointer to a null-terminated string. The buffer must be large enough to contain both strings.
lpString2
[input] Pointer to the null-terminated string to be appended to the string specified in the lpString1 parameter.

Return

If the function succeeds, the return value is a pointer to the buffer. If the function fails, the return value is NULL.

Examples

EX1

void strcat_ex1()
{
    char        szStr[80] = "This is the first part. ";
    string        str1 = "This is the second part.";
    // Concatenate: 
    strcat(szStr, str1);
    out_str(szStr);
}

Remark

See Also

lstrcat

Header to Include

origin.h

Reference