As James said, use std::string... except that the global order of construction and destruction is undefined between translation units.
, char*, strcpy (. man strcpy) , buf NUL-. strcpy buf X.
char buf[256];
strcpy(X, buf);
, std::string. strcpy , (X) . 256 , strlen("test_1"), . X (, X = new char[number_of_characters_needed]). X char 256 char*.
IIRC, strcpy (, char * X = "test_1" ) - undefined... ... ++! std::string!:)
( , ++, , , " undefined" , ... , )