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
initialize array with new
initialize array with new
Jan 15, 2011 at 2:57pm UTC
vagelis
(106)
dear all,
i know that we can asign a value to there where a new pointer refers
int *a=new int(99);
can we do that also for an array??
to give the same value to all its contents
int *a=new int[6](4);
Jan 15, 2011 at 3:09pm UTC
Bazzy
(6281)
no, new[] only default-constructs
Jan 15, 2011 at 11:12pm UTC
vagelis
(106)
ok thank you!!
Topic archived. No new replies allowed.