p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional C++, 3rd Edition (http://p2p.wrox.com/book-professional-c-3rd-edition-790/)
-   -   Dynamically Allocated Arrays (http://p2p.wrox.com/book-professional-c-3rd-edition/100126-dynamically-allocated-arrays.html)

mathewpowell January 4th, 2019 04:28 PM

Dynamically Allocated Arrays
 
Code:

int arraySize = 8;
int* myVariableSizedArray = new int[arraySize];

array size must be const or constexpr value.

Code:

constexpr int arraySize = 8;
int* myVariableSizedArray = new int[arraySize];



All times are GMT -4. The time now is 01:16 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.