Initializing dynamic array pointer of Type T
How to initialize dynamic array pointer of Type T
Example
1 2
|
//How to initialize this
Type *t = new Type[some_value]
|
Or how to set all to NULL
Last edited on
So, can I check if t[index] == NULL??
Yes. Pointers are value-initialized to null.
Topic archived. No new replies allowed.