CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
https://www.sololearn.com/Discuss/3082144
how-do-i-avoid-errors-when-altering-string-that-s-under-15-characters-long-to-greater-than-15
*/
#include <iostream>
//#include <sstream>
//#include <cstring>
//#include <iterator>
//#include <vector>
using namespace std;
int main() {
string str, strR="";
str = " 0, 1, 2, ..., 9, 10, 11, 12 and 17 ";
//getline(cin, str);
string::iterator itr = str.begin();
int counter = 0;
for(itr = str.begin(); itr != str.end(); itr++){
//cout << counter << "\t" << str[counter] << "\t" << *itr << endl;
if(isdigit(*itr)){
switch (*itr){
case '0':
strR += "zero";
break;
case '1':
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run