String comparison C++
<p>I want to check <code>szDir</code> in <code>szSelectedDir</code>. I want the function to consider the below inputs are different. My sample function is not handling the scenario, please let me know the good solutions.</p>

<pre><code>string szSelectedDir ="C:\\Windows1\Test";
string szDir="C:\\Windows";

void IsWindowsDirectory(const string szSpecialPath, const string szSelectedPath)
{

    if(szSelectedPath.compare(szSpecialPath) == 0)
    {
        printf("Both paths are same ");

    }
    else if(szSelectedPath.find(szSpecialPath) != string::npos)
    {
        printf("Both paths are same ");
    }
    else
    {
        printf("Both paths are different ");

    }

}
</code></pre>
