I use visual studio 2017
int main() { std::string a = "hello"; std::cout << &a; a[1] = 'r'; std::cout << &a; gives same address as above std::cin.get(); } when i hover the mouse pointer over "hello".
It shows const char[6]. So "hello" is stored in read only memory.
then how come it is possible to change the value in it.