cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
vector
vector
Oct 18, 2011 at 8:59pm UTC
unbdd
(2)
In Stroustrup's C++ book, there is something like:
vector<
double
>* p =
new
vector<
double
>(s2)
// s2 is an int variable
If I want to delete this vector, should I use
delete
p;
or
delete
[] p;
Oct 18, 2011 at 9:33pm UTC
closed account (
zb0S216C
)
Use
delete
without the brackets.
Wazzak
Topic archived. No new replies allowed.