mirror of https://github.com/xfarrow/lasd.git
18 lines
470 B
C++
18 lines
470 B
C++
|
#include<iostream>
|
||
|
using namespace std;
|
||
|
int main(){
|
||
|
string s1 = "hello";
|
||
|
string s2 = "world";
|
||
|
cout<<"Stringa 1: "<<s1<<endl<<"Stringa 2: "<<s2<<endl;
|
||
|
cout<<"PTR Stringa 1: "<<&s1<<endl<<"PTR Stringa 2: "<<&s2<<endl<<endl;
|
||
|
s1 = move(s2);
|
||
|
|
||
|
cout<<"Stringa 1: "<<s1<<endl<<"Stringa 2: "<<s2<<endl;
|
||
|
cout<<"PTR Stringa 1: "<<&s1<<endl<<"PTR Stringa 2: "<<&s2<<endl<<endl;
|
||
|
|
||
|
s2 = "cacca";
|
||
|
cout<<"Stringa 1: "<<s1<<endl<<"Stringa 2: "<<s2<<endl;
|
||
|
|
||
|
return 0;
|
||
|
}
|