What is the simplest way to get the directory that a file is in? I\'m using this to find the working directory.
string filename = \"C:\\MyDirectory\\MyFile.b
You can use the _spliltpath function available in stdlib.h header. Please refer to this link for the same.
http://msdn.microsoft.com/en-us/library/aa273364%28v=VS.60%29.aspx