#include <iostream>
#include <string>
void sub(std::string str, int start, int size){
if(size == 0){
return;
}
std::cout<<str[start]<<' ';
sub(str, start+1, size-1);
}
int main() {
std::string str = "abc";
int size = str.size();
sub(str, 0, size);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: