Link to home
Start Free TrialLog in
Avatar of FireBall
FireBall

asked on

concat std::string

How should i solve this :)


	std::string RANGE ;
			std::stringstream RANGEstream;
			for (std::pair<long int, int> element : TTL) {
				RANGEstream <<  element.first;
				RANGE = RANGE + RANGEstream;
			}

Open in new window



dinleyici.c:352:19: error: no match for ‘operator+’ (operand types are ‘std::string {aka std::basic_string<char>}’ and ‘std::stringstream {aka std::basic_stringstream<char>}’)
     RANGE = RANGE + RANGEstream;
                   ^

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of phoffric
phoffric

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of phoffric
phoffric

Or..
RANGE += RANGEstream.str();