/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
string ins = "a!! Gp SD-fsdfdf SD,ee ; l";
vector <string> v;
string::iterator it0 = ins.begin();
for (string::iterator it = ins.begin(); it != ins.end(); ++it) {
if (!isalpha(*it)) {
if (it0 != it) v.push_back(string{it0, it});
it0 = it + 1;
}
}
if (it0 != ins.end()) v.push_back(string{it0, ins.end()});
for (auto w : v) {
std::cout << "[" << w << "] ";
}
return 0;
}