Grace à vous j'ai trouvé.
Maintenant j'ai une nouvelle erreur dans une autre fonction.
Voila l'erreur que j'obtiens :
classwizard.cpp:770: erreur: passing 'const std::string' as 'this' argument of 'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' discards qualifiers
Et le code correspondant est le suivant :
766voidwriteString(conststringbuff)
767{
768
769// On limite la chaine à 10 caractères
770buff=buff.substr(0,10);
771
772// On copie la chaine dans le buffer
773//strncpy(&SendBuff[5], buff.c_str(), buff.size());
774copy(buff.begin(),buff.end(),&SendBuff[5]);
775// On peut aussi copier avec std::copy(buff.begin(), buff.end(), &SendBuff[5]);
776
777
778SendBuff[0]=0x80;//CLA
779SendBuff[1]=0xD2;//INS
780SendBuff[2]=0x00;//P1
781SendBuff[3]=0x00;//P2
782SendBuff[4]=buff.size();//P3
783
784dwSend=SendBuff[4]+0x05;
785dwRecv=2;
786
787ExchangeData(SendBuff,dwSend,RecvBuff,&dwRecv);// Envoi à la carte
788
789}
Voila
Pouvez vous m'aider à trouver cette erreur
Merci à tous