what's the outcome?# Programming - 葵花宝典
m*g
1 楼
string a1 = "Hello";
string a2 = "world!";
string* s1 = 0;
string& s2 = a1;
s1 = &a1;
s2 = a2;
std::cout << *s1 << " " << s2 << std::endl;
and why?
string a2 = "world!";
string* s1 = 0;
string& s2 = a1;
s1 = &a1;
s2 = a2;
std::cout << *s1 << " " << s2 << std::endl;
and why?