You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.2 KiB
31 lines
1.2 KiB
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/06/14 11:01:07 by narnaud #+# #+# */
|
|
/* Updated: 2022/06/14 11:08:21 by narnaud ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <iostream>
|
|
using std::string;
|
|
using std::cout;
|
|
using std::endl;
|
|
|
|
int main(void)
|
|
{
|
|
string str = "HI THIS IS BRAIN";
|
|
string *stringPTR = &str;
|
|
string &stringREF = str;
|
|
|
|
cout << &str << endl;
|
|
cout << stringPTR << endl;
|
|
cout << &stringREF << endl;
|
|
|
|
cout << str << endl;
|
|
cout << *stringPTR << endl;
|
|
cout << stringREF << endl;
|
|
}
|
|
|