fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. #include <numeric>
  4. using namespace std;
  5.  
  6. int main() {
  7. const char* arr[]{"forward ", "50 ", "back ", "20"};
  8. const string check = accumulate(cbegin(arr), cend(arr), string());
  9.  
  10. cout << check;
  11. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
forward 50 back 20