2017-06-24 1 views

Répondre

1

std::to_string should help you out with this one

#define theValue 1000 

static std::string str = R"(

foo)" + std::to_string(theValue) + R"(bar 

)"; 

Dans le cas général, vous avez besoin string s ou quelque chose qui peut être converti implicitement en string afin d'utiliser l'opérateur de concaténation de std::string.