blob: 9c34b51ea2cb7ab5ece3a97d1d7705c675a7fb82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ex04.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/02 12:43:03 by cacharle #+# #+# */
/* Updated: 2020/02/02 12:43:06 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#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 << ref_s << std::endl;
std::cout << *ptr_s << std::endl;
return 0;
}
|