Nov 26, 2003 #1 inetd Technical User Jan 23, 2002 115 HK char *c; char *s10; char *s50; c=new char; s10=new char[10]; s50=new char[50]; How should we free these memory correctly? delete c; delete s10; delete s50; Are these correct? Thanks.
char *c; char *s10; char *s50; c=new char; s10=new char[10]; s50=new char[50]; How should we free these memory correctly? delete c; delete s10; delete s50; Are these correct? Thanks.
Nov 26, 2003 #2 bNasty Programmer Oct 29, 2001 101 GB delete c; delete [] s10; delete [] s50; Upvote 0 Downvote