Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string input; //input to be cleaned
- string output; //output
- int length_i; //strlen of input
- int length_o; //strlen of output
- bool found; //checks if [ has been reached and waiting for ]
- found = false;
- cout << "Enter string to be cleaned:" << endl;
- cin >> input;
- length = strlen(input);
- for (int i = 0; i < length; i++)
- {
- //if we are in the brackets, we don't want to add to the string
- if (found == true)
- { }
- else
- { }
- if (input[i] == '['){
- if (found == true){
- found = false;
- }
- else
- {
- found = true;
- }
- }
- if ()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement