From 05f2df34290af477b0fee49b75e5f56e1d6c83f9 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 8 Dec 2018 12:58:04 +0100 Subject: Initial commit with kinda crappy unnumbered examples --- memory-allocation.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 memory-allocation.cpp (limited to 'memory-allocation.cpp') 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; +} -- cgit v1.2.1