| 123456789101112131415161718192021222324252627282930 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* main.cpp :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@gmail.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2025/07/15 14:57:39 by bchanot #+# #+# */
- /* Updated: 2025/07/15 15:14:56 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include <iostream>
- int main(void) {
- std::string str = "HI THIS IS BRAIN";
- std::string *stringPTR = &str;
- std::string &stringREF = str;
- std::cout << &str << " | str address" << std::endl;
- std::cout << &stringPTR << " | stringPTR address" << std::endl;
- std::cout << &stringREF << " | stringREF address" << std::endl;
- std::cout << str << "| str value" << std::endl;
- std::cout << *stringPTR << "| stringPTR value" << std::endl;
- std::cout << stringREF << "| stringVAR value" << std::endl;
- return 0;
- }
|