aboutsummaryrefslogtreecommitdiff
path: root/cpp01/ex04
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-12 20:20:12 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-12 20:20:12 +0100
commit7d6a4c877de8048ec5fbea4a563b3d09c8976105 (patch)
treea62206e21b3b678d0da6350978e2f6db7cc31fbe /cpp01/ex04
parent7080f89bb2800917bfd9a560046a1ab7505f819e (diff)
downloadpiscine_cpp-7d6a4c877de8048ec5fbea4a563b3d09c8976105.tar.gz
piscine_cpp-7d6a4c877de8048ec5fbea4a563b3d09c8976105.tar.bz2
piscine_cpp-7d6a4c877de8048ec5fbea4a563b3d09c8976105.zip
cpp01 00 -> 04
Diffstat (limited to 'cpp01/ex04')
-rw-r--r--cpp01/ex04/ex04.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp01/ex04/ex04.cpp b/cpp01/ex04/ex04.cpp
new file mode 100644
index 0000000..865cb1a
--- /dev/null
+++ b/cpp01/ex04/ex04.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+#include <string>
+
+int main()
+{
+ std::string s = "HI THIS IS BRAIN";
+ std::string &ref_s = s;
+ std::string *ptr_s = &s;
+
+ std::cout << *ptr_s << std::endl;
+ std::cout << ref_s << std::endl;
+ return 0;
+}