Monday, May 28, 2012

Convert int to string in C++

STRINGSTREAM can be used  in C++ to convert int to string


string int2str (int n) {
stringstream ss;
ss << n;
return ss.str();
}

1 comment:

  1. very informative post indeed .being enrolled in http://www.wiziq.com/course/5776-object-oriented-programming-with-c
    i was looking for such articles online to assist me and your article helped me a lot. i really like that you are providing such information.

    ReplyDelete