Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using std::cin;
- using std::cout;
- #include "func.h"
- int main() {
- cin.tie(nullptr);
- std::ios::sync_with_stdio(false);
- int n, op_col, ind; cin >> n;
- MyString str;
- read(str, n);
- cin >> op_col;
- char cmd, x;
- while(op_col--) {
- cin >> cmd;
- if (cmd == '+') {
- cin >> ind;
- cin.get(); x = cin.get();
- if (ind--) insert(str, x, ind);
- else push_back(str, x);
- } else {
- print_size(str);
- }
- }
- print(str);
- del(str);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement