#include "stdafx.h"
int main(int argc, char* argv[])
{
//string s("hello world");
string s = "hello world";
string *p = &s;
*p = "goodbye";//此时字符串s的值也变化了
string *sp = &s;
sp = p;
*sp = "new another world";//都指向了同一内存地址
cout << s << endl;//s的值为new another world
return 0;
}