Boost logo

Boost Users :

Subject: [Boost-users] string comparison
From: pedro chaparro (pdro07_at_[hidden])
Date: 2010-02-10 07:42:31


hi, i'm getting a message from a socket like

char *datos3="UNBLOCK";
size_t len2 = socket.read_some(boost::asio::buffer(buf2), error2);

     datos2=(buf2.data());

*//and compare datos2 and datos3*

ost::is_equal test;

  if (test(datos2,datos3))
 { std::cout << "Equal" << endl;
    return;
 }
 else
 std::cout << "NO Equal" << endl;

but the string in Datos2 is : UNBLOCK@= ��< ,
what i got that strange charateres?
thanks

Ing Pedro Alonso Chaparro Valero
Ciudad Politecnica de la Innovación
iTEAM - Mobile Communications Group
Polytechnic University of Valencia
C\ Camino de Vera S/N, Edificio 8G
46022 Valencia, Spain



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net