Created
May 28, 2014 18:05
-
-
Save 2J/72823b89330f5d3ea811 to your computer and use it in GitHub Desktop.
Dynamic Array C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//dynamic array | |
int n; | |
//get n from user | |
int* array; | |
array = new int[n]; | |
//do things | |
//e.g. array[0]=3; | |
delete [] array; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment