When I do this in C++:
i believe that compiler stores the const char* in probably read only memory, which will be of no use from now onwards, plus the name object has it's own copy of const char* above. Is it possible/already done by compiler to avoid keeping const char* like above?Code:std::string name("No Name");