fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float num = 20.0;
  6. std::string test = "derpy derpy" + std::to_string(num) + "derpy derpy";
  7. printf("test = %s", test.c_str());
  8. return 0;
  9. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
test = derpy derpy20.000000derpy derpy