NSSearchPathForDirectoriesInDomains() is a low level API that should be avoided unless you need it for some unusual reason. Instead you should be using NSURL. This is Apple's official recommendation:
The NSSearchPathForDirectoriesInDomains function behaves like the URLsForDirectory:inDomains: method but returns the directory’s location as a string-based path. You should use the URLsForDirectory:inDomains: method instead.
It's used like this:
NSURL *documentsURL = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].lastObject;
The NSURL object does exactly what you want: it's an object that contains a base URL and then a relative URL under that.
If you are writing a cross platform app you need to write a wrapper around everything that is not cross platform, and filesystem operations are one of the things you need to abstract. Write a C++ wrapper around NSURL and NSFileManager, and have your wrapper use something else on other platforms.
NSURL is generally faster and less buggy reliable and uses less RAM than using strings. Often it uses low level filesystem/sector references.