We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int q;
cin>>q;
string out{};
while (q>=0)
{
string s;
getline(cin,s);
vector split = splitString(s, " ");
Simple Text Editor
You are viewing a single comment's thread. Return to all comments →
C++
include
include
include
include
include
include
using namespace std;
static stack sString{}; void append(string &s,string appStr){ sString.push(s); s=s+appStr; //cout<<"Appended: "<
void del( int k, string &s){ sString.push(s); if(s.size()-k >=0) s.erase(s.size()-k,k); //cout<<"Deleted: "<
void print(int k,const string &s){ cout << s[k-1]<
void undo(string &s){
}
vector splitString(string s,string delimiter) { vector out{}; int start=0; int end=s.find(delimiter,start); while(end!=string::npos) { out.push_back(s.substr(start,end-start)); start=end+delimiter.length(); end=s.find(delimiter,start); } out.push_back(s.substr(start)); return out; }
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
int q; cin>>q; string out{}; while (q>=0) { string s; getline(cin,s); vector split = splitString(s, " ");
}