On 14 Maj, 15:24, Nordlöw <per.nord...@gmail.com> wrote:
> Han anybody written any snippet (template i guess) that realizes memdup
> () using the operator new. Suggested name: new_duplicate.
>
> Thanks in advance,
> Nordlöw

Ooops, memdup() was defined by me... Here's the definition:

static inline char *
memdup(const char *s, size_t n)
{
  char * t = (char*)malloc(n);
  memcpy(t, s, n);
  return t;

}

Sorry,
Nordlöw
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to