Évite les "using namespace", voir: http://0217021.free.fr/portfolio/axel.berardino/articles/bon-usage-using-namespace
Si c'est vraiment mot par mot, tu peux utiliser un std::stringstream.
#include
#include <sstream>
int main()
{
std::string trame = "-12 1 0 1";
std::stringstream buff;
int x, y, z, a;
buff << trame;
buff >> x >> y >> z >> a;
std::cout << x << " -> "
<< y << " -> "
<< z << " -> "
<< a << std::endl;
return 0;
}
________________________________________________________________________
Historique de mes créations, et quelques articles:
[ http://0217021.free.fr/portfolio http://0217021.free.fr/portfolio]
Merci d'utiliser Réponse acceptée si un post répond à votre question