Add solution to ex02 (wihout Makefile)
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 10 Oct 2024 10:13:16 +0000 (12:13 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 10 Oct 2024 10:13:16 +0000 (12:13 +0200)
ex02/main.cpp [new file with mode: 0644]

diff --git a/ex02/main.cpp b/ex02/main.cpp
new file mode 100644 (file)
index 0000000..cc83bbd
--- /dev/null
@@ -0,0 +1,17 @@
+#include <string>
+#include <iostream>
+
+int    main(void)
+{
+       std::string     string("HI THIS IS BRAIN");
+       std::string     *stringPTR(&string);
+       std::string     &stringREF(string);
+
+       std::cout << &string << '\n'
+               << &stringPTR << '\n'
+               << &stringREF << '\n';
+       std::cout << string << '\n'
+               << *stringPTR << '\n'
+               << stringREF << '\n';
+       return (0);
+}