There are many ways to approach this. You could do it by stepping through the string one character at a time and testing for the delimiter, and so on. But this is a reasonably common type of string-parsing operation, it is easier to adapt a ready-made solution rather than re-invent the wheel.
Given that this is a c++ forum, I'd suggest using a stringstream and getline with a specified delimiter of '/'. Then each extracted part would be a string in its own right, you just need to re-assemble the parts to make up a new string in the required order.