1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| boost::scoped_array<char> Nomatt[SHE_TAILLE_NOMATT];
boost::scoped_array<char> Valatt[SHE_TAILLE_NOMATT];
for (int i=0; i< NB_MAX_EXTRAS; i++)
{
const std::string& nom = fde_evt.get_nomatt(i).
const std::string& val = fde_evt.get_valatt(i);
Nomatt[i] = boost::scoped_array<char>(new char[nom.size()+1]);
Valatt[i] = boost::scoped_array<char>(new char[val.size()+1]);
memcpy(Nomatt[i].get(), nom.c_str(), nom.size()+1);
memcpy(Valatt[i].get(), val.c_str(), val.size()+1);
}
char* Nomatt2[SHE_TAILLE_NOMATT];
char* Valatt2[SHE_TAILLE_VALATT];
for (int i=0; i< NB_MAX_EXTRAS; i++)
{
Nomatt2[i] = Nomatt[i].get();
Valatt2[i] = Valatt[i].get();
} |
Partager