Code:
  char str[]="Hello";                 // 5 chars
  char *tmpstr;
  int size = strlen(str);              // 5
  tmpstr = new char[size+1];   // char[6]
  strcpy_s(tmpstr, size, str);         <error
  tmpstr[size]=0;
results in . But i have no clue why. Why do i get this error?