How to assign string to other string in C++

1 Answer

0 votes
#include <iostream>
#include <string>

using std::cout;
using std::endl;
using std::string;

int main()
{
	string s1("c++"), s2 = s1;

	cout << s2 << endl;

	return 0;
}

/*
run:

c++

*/

 



answered May 8, 2018 by avibootz
...