To find characters in the string, you can use one of the find() methods of the string class.
You could use std::sort() for the second part, but if you have to use bubble sort you'll probably want to find some code somewhere and copy it after studying how it works. Then simply call in on your string. You may need to create a C-style string copy to do this.