credo che con una semplice funzione atoi(int n) risolvi il problema...

http://www.cplusplus.com/reference/c.../cstdlib/atoi/