Cita:
Iniciado por razer
maestro, es lo que NO QUIERO HACER :P
lo dije en el 1er post.
queria usar algo para limpear el buffer o algo.... eso buscaba
Tienes razon. Mi error.
La alternativa que buscas es hacer esto:
Código:
int i = 3;
int k = 5;
string test, test2;
stringstream out;
out << i;
out >> test; // sacar desde el stream hacia un string
out.clear(); // marcar errores posibles como ya manejados
out << k;
out >> test2; // sacar otra vez
cout << test << " " << test2 << std::endl;