From 7d6a4c877de8048ec5fbea4a563b3d09c8976105 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 12 Jan 2020 20:20:12 +0100 Subject: cpp01 00 -> 04 --- cpp01/ex04/ex04.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cpp01/ex04/ex04.cpp (limited to 'cpp01/ex04') 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 +#include + +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; +} -- cgit