some newbie questions of construction
From: bucher (csjinjian_at_163.net)
Date: 06/29/04
- Next message: ht: "Re: reading input into function problem"
- Previous message: Jerry Coffin: "Re: no match for complain"
- Next in thread: Thomas Matthews: "Re: some newbie questions of construction"
- Reply: Thomas Matthews: "Re: some newbie questions of construction"
- Reply: Francis Glassborow: "Re: some newbie questions of construction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Jun 2004 21:06:03 +0800
Hi,
I'm confused by one question. Here is the questions:
char* pBuf = new char[100];
what the destructor should be? "delete pBuf" or "delete [] pBuf"?
I remember that if a is a class, after the constructor "new [100] a();",
the destrutor should be "delete [] a", but how about the primitive type?
Thanks in advance.
- Next message: ht: "Re: reading input into function problem"
- Previous message: Jerry Coffin: "Re: no match for complain"
- Next in thread: Thomas Matthews: "Re: some newbie questions of construction"
- Reply: Thomas Matthews: "Re: some newbie questions of construction"
- Reply: Francis Glassborow: "Re: some newbie questions of construction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]