home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!uunet.ca!snitor!promis.com!fogel
- From: fogel@promis.com (Richard Fogel)
- Subject: Should char arrays be deleted with delete[]?
- Message-ID: <1992Dec18.161338.28124@promis.com>
- Keywords: C++
- Organization: PROMIS Systems Corp.
- Date: Fri, 18 Dec 1992 16:13:38 GMT
- Lines: 14
-
- Should char strings allocated as follows:
-
- char *str = new char[10];
-
- later be deleted by:
-
- delete []str OR delete str ?
-
- ------------------------------------------------------------------------------
- Thanks, this would be a great help, as the texts do not realy address this
- issue, and I understand that the wrong delete approach will cause unexplained
- results.
-
- Richard Fogel
-