/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/04 19:01:36 by adjoly #+# #+# */ /* Updated: 2024/11/04 19:15:33 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ #include #include int main(void) { std::string str = "HI THIS IS BRAIN"; std::string *stringPTR = &str; std::string &stringREF = str; std::cout << "The address of the string : " << &str << std::endl; std::cout << "The address of the string pointer : " << stringPTR << std::endl; std::cout << "The address of the string reference : " << &stringREF << std::endl; std::cout << std::endl; std::cout << "The value of the string : " << str << std::endl; std::cout << "The value pointed to by stringPTR : " << *stringPTR << std::endl; std::cout << "The value pointed to by stringREF : " << stringREF << std::endl; }