p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional C++, 3rd Edition (http://p2p.wrox.com/forumdisplay.php?f=790)
-   -   Dynamically Allocated Arrays (http://p2p.wrox.com/showthread.php?t=100126)

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 05:43 PM.

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