Does C++ have any equivalent to python\'s function os.path.join? Basically, I\'m looking for something that combines two (or more) parts of a file path so that
At least in Unix / Linux, it's always safe to join parts of a path by /, even if some parts of the path already end in /, i.e. root/path is equivalent to root//path.
In this case, all you really need is to join things on /. That said, I agree with other answers that boost::filesystem is a good choice if it is available to you because it supports multiple platforms.