fork download
  1. #include <iostream>
  2. #include <sstream>
  3.  
  4. using namespace std;
  5.  
  6. string concatInt(int num1, int num2){
  7. stringstream ss;
  8. ss << num1 << num2;
  9.  
  10. return ss.str();
  11. }
  12.  
  13. int main() {
  14. string strPosition = concatInt(1, 11);
  15. char* chrPosition = &strPosition[0];
  16.  
  17. cout << chrPosition << endl;
  18. return 0;
  19. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
111