/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: aortigos int main() { std::string str = "HI THIS IS BRAIN"; std::string *ptr = &str; std::string &ref = str; // Imprimimos las direcciones de memoria std::cout << "Printing memory addresses..." << std::endl; std::cout << "Str memory address: " << &str << std::endl; std::cout << "Ptr memory address: " << ptr << std::endl; std::cout << "Ref memory address: " << &ref << std::endl; std::cout << std::endl; // Imprimimos los valores std::cout << "Printing values..." << std::endl; std::cout << "Str value: " << str << std::endl; std::cout << "Ptr value: " << *ptr << std::endl; std::cout << "Ref value: " << ref << std::endl; return (0); }