summaryrefslogtreecommitdiffstats
path: root/memory-allocation.cpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-12-08 12:58:04 +0100
committerNao Pross <naopross@thearcway.org>2018-12-08 12:58:04 +0100
commit05f2df34290af477b0fee49b75e5f56e1d6c83f9 (patch)
tree66a7214321c874be02d1a4a9b4fd3f489dc09ad8 /memory-allocation.cpp
downloadcplusplus-05f2df34290af477b0fee49b75e5f56e1d6c83f9.tar.gz
cplusplus-05f2df34290af477b0fee49b75e5f56e1d6c83f9.zip
Initial commit with kinda crappy unnumbered examples
Diffstat (limited to '')
-rw-r--r--memory-allocation.cpp9
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;
+}