tags:

views:

86

answers:

1

Possible Duplicate:
int to std::string?

How can you convert int to std::string?

A: 

you can use stringstream; stole this from here:

#include <iostream>
#include <sstream>

int main() {
  int number = 123;

  std::stringstream ss;
  ss << number;

  std::cout << ss.str() << endl;
}
naspinski