- char* host_id = bprintf("%s%d%s", cluster->prefix, i, cluster->suffix);
- NetPointNs3* host_src = sg_host_by_name(host_id)->pimpl_netpoint->extension<NetPointNs3>();
- xbt_assert(host_src, "Cannot find a NS3 host of name %s", host_id);
+ std::string host_id = cluster->prefix + std::to_string(i) + cluster->suffix;
+ NetPointNs3* host_src = sg_host_by_name(host_id.c_str())->pimpl_netpoint->extension<NetPointNs3>();
+ xbt_assert(host_src, "Cannot find a NS3 host of name %s", host_id.c_str());