#include <iostream>
#include <string>
#include <sstream>
#include <vector>
usingnamespace std;
int main()
{
int a = 10;
stringstream ss;
ss << a;
string str = ss.str();
string strr = "abc"; // strr hold abc. I want to put the string inside str in between a and b
//the answer should be a10bc
for(int i = 1;i < 2;i++)
{
//code goes here
}
cout << strr;
system("pause");
return 0;
}
It's unlikely your compiler can't do to_string.
You probably just have to set it to use C++11.
On gcc you just add the -std=c++11 option.
Look for a place to add compiler options (or possibly just a checkbox).