fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. string create_path (const string &prefix, int id, const string &surfix) {
  6. return prefix + to_string(id) + surfix;
  7. };
  8.  
  9. int main() {
  10. cout << create_path("/home/satirev/C++_docs/doc", 4, ".pdf");
  11. return 0;
  12. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
/home/satirev/C++_docs/doc4.pdf