Boost logo

Boost Users :

Subject: Re: [Boost-users] lexical problem
From: pedro chaparro (pdro07_at_[hidden])
Date: 2009-09-15 12:05:09


does not work either =(, i dont understand why can i not do this :

std::string datos(buf.data(),2);
printf("%s \n",datos);

datos must not be a string?? i get and error where say me datos is an
integer. =s

client7array.cpp:80: warning: cannot pass objects of non-POD type ‘struct
std::string’ through ‘...’; call will abort at runtime
client7array.cpp:80: warning: format ‘%s’ expects type ‘char*’, but argument
2 has type ‘int’

thanks

2009/9/15 Igor R <boost.lists_at_[hidden]>

> > So how can i only take the "50" without the other characters?
>
> std::string datos(buf.data(), 2);
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
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