How to get substring from specific index to end of string in C++

1 Answer

0 votes
#include <iostream>
  
int main() {
    std::string s = "c++ python java";

    std::cout << s.substr(6);

    return 0;
}
  
  
  
  
/*
run:
  
thon java
  
*/

 



answered Dec 9, 2020 by avibootz
...