diff options
Diffstat (limited to '')
-rw-r--r-- | memory-allocation.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/memory-allocation.cpp b/memory-allocation.cpp new file mode 100644 index 0000000..83d7eda --- /dev/null +++ b/memory-allocation.cpp @@ -0,0 +1,9 @@ +int main(int argc, char *argv[]) { + // int *hello = (int) malloc(10 * sizeof(int)); + int *hello = new int[10]; + + // free(hello) + delete hello; + + return 0; +} |