Skip to content

Instantly share code, notes, and snippets.

@domiyanyue
Created August 10, 2020 20:41
Show Gist options
  • Save domiyanyue/d9b097dd13afad0ba952372b6e0e53ab to your computer and use it in GitHub Desktop.
Save domiyanyue/d9b097dd13afad0ba952372b6e0e53ab to your computer and use it in GitHub Desktop.
Static memory
class A {
public:
A(int n){
array = new int[n];
}
~A(){
delete array;
}
private:
int *array;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment