title: C++ using strcpy_s() on a Pointer to char array Pointer
body: <p>I am to the point I am confusing myself but here is what I have. I have only recently started to familiarize myself with pointers more to a point I feel more comfortable using them, but I am getting an error about the buffer in strcpy_s() being too small.</p>
  
  <p>Please no comments about me using char arrays instead of std::string, its for the HL2SDK which centers around char arrays (no idea why) so I just stick to the pattern.</p>
  
  <pre><code>void func_a()
  {
      char *szUserID = new char[64];
      char *szInviterID = new char[64];
      char *szGroupID = new char[64];
      sprintf(szUserID, "%I64d", GetCommunityID(szUserSteamID));
      sprintf(szInviterID, "%I64d", GetCommunityID(g_CvarSteamID.GetString()));
      GetGroupCommunityID(1254745, &amp;szGroupID); // Group Steam Community ID
  }
  
  void GetGroupCommunityID(int groupID, char **communityID)
  {
      int staticID = 1035827914;
      int newGroupID = 29521408 + groupID;
  
      char *buffer = new char[64];
      snprintf(buffer, sizeof(buffer), "%d%d", staticID, newGroupID);
      strcpy_s(*communityID, sizeof(*communityID), buffer);
  
      delete buffer;
  }
  </code></pre>