View Single Post
  #1 (permalink)  
Old January 4th, 2019, 04:28 PM
mathewpowell mathewpowell is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2019
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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];
Reply With Quote