1. You don't have any ints here.
2. You don't need to cast it to a string if you are just using std::cout
3. std::to_string is C++11, Many compilers still don't support it. DevC++ probably never will.
here are some solutions:
1 2 3 4 5 6 7
#include <iostream>
int main()
{
int i = 43;
std::cout << i;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
#include <sstream>
int main()
{
int i = 43;
std::stringstream ss;
ss << i;
std::string str;
ss >> str;
std::cout << str;
}