summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorShivesh Mandalia <mail@shivesh.org>2022-04-16 18:01:59 +0100
committerShivesh Mandalia <mail@shivesh.org>2022-04-16 18:01:59 +0100
commitb01ea4aaf97a50c11c649be6e4dc10dcde5ebf17 (patch)
tree3e440e7f832b3d12d0008f58728c738885104646 /main.cpp
downloadbasic_makefile-b01ea4aaf97a50c11c649be6e4dc10dcde5ebf17.tar.gz
basic_makefile-b01ea4aaf97a50c11c649be6e4dc10dcde5ebf17.zip
Initial commit
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp14
1 files changed, 14 insertions, 0 deletions
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 <iostream>
+
+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;
+}