You could create a dynamic array with the operator new.
int * a = new int[size];
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
Ideally you would use the std::vector class instead of trying to manage dynamic memory and pointers.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Ideally you would use the std::vector class instead of trying to manage dynamic memory and pointers.
Yeah, the standards committee spent all that time creating the standard temple libraries maybe we should consider the vector.
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387