Skip to content

Instantly share code, notes, and snippets.

@2J
Created May 28, 2014 18:05
Show Gist options
  • Save 2J/72823b89330f5d3ea811 to your computer and use it in GitHub Desktop.
Save 2J/72823b89330f5d3ea811 to your computer and use it in GitHub Desktop.
Dynamic Array C++
//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