Afficher un message
Vieux 08/04/2008, 16h16   #1
Guillaume GOURDIN
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Probleme avec istringstream

Bonjour à tous, j'ai un problème avec le code suivant :

#include <sstream>
#include <iostream>
#include <stdint.h>
using namespace std;

int main(int argc, char ** argv)
{
string s("endor ID Low Byte");
istringstream iss;
uint32_t tmp;

iss.str( s );

if ( !(iss >> hex >> tmp) )
{
return ( false );
}

cout << tmp << endl;

return ( true );
}

Pour ce code, "endor ID Low Byte" est une représentation hexadécimal de
14... Quelqu'un peut-il me dire ce que je fais pas bien?

Merci d'avance!
  Réponse avec citation
 
Page generated in 0,04748 seconds with 9 queries