From b01ea4aaf97a50c11c649be6e4dc10dcde5ebf17 Mon Sep 17 00:00:00 2001 From: Shivesh Mandalia Date: Sat, 16 Apr 2022 18:01:59 +0100 Subject: Initial commit --- main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 main.cpp (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..dd41600 --- /dev/null +++ b/main.cpp @@ -0,0 +1,14 @@ +#include + +int add_one(int x); + +int main() { + std::cout << "hello world\n"; + int* x = nullptr; + int y = 2; + x = &y; + std::cout << *x << '\n'; + auto z = add_one(*x); + std::cout << z << '\n'; + return *x; +} -- cgit v1.2.3