smartczy/Cpp-Primer — pull request #1 by smartczy (2014-12-21 09:03:33+00:00)
Title: fix ex_4.10

#include
#include

using std::cout; using std::endl;

int main()
{
const char* cs1 = "Wangyue";
const char* cs2 = "Pezy";

size_t size = strlen(cs1) + strlen(cs2) + 2;
char* cs3 = new char(size);

strcpy_s(cs3, size, cs1);
strcat_s(cs3, size, " ");
strcat_s(cs3, size, cs2);

cout << cs3 << endl;

//delete cs3;

return 0;
}