How to get platform-specific path separator in C++?
<p>How can I get the platform-specific path separator (<em>not</em> directory separator) in C++, i.e. the separator that is needed to combine multiple paths in a list (e.g. <code>PATH</code> environment variable).</p>

<p>Under Linux, this would be <code>:</code>, under Windows <code>;</code>.</p>

<p>In other words, I am looking for the C++-equivalent of Pyhton's <code>os.pathsep</code>, Java's <code>path.separator</code> or PHP's <code>PATH_SEPARATOR</code>. </p>

<p>If Boost provides such a function that would be fine, as we are using it in our projects anyway. If not, I guess any other solution would be good.</p>

<p>All I could find (here and elsewhere) were either just ways to retrieve the directory separator (i.e. <code>/</code> vs. <code>\</code>) or related to other languages than C++.</p>
