Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- string ns;
- strRemove(string s)
- {
- for(int i =0; i<s.length(); i++){
- if(s.at(i)!='p')
- {
- ns+=s.at(i);
- }
- }
- }
- using namespace std;
- int main()
- {
- string str1 = "lorem ipsum";
- strRemove(str1);
- cout << ns;
- }
Advertisement
Add Comment
Please, Sign In to add comment