
17 May
2009
17 May
'09
10:47 p.m.
On Mon, May 18, 2009 at 12:03 AM, Sean Farrow
Hi: I don't think i am, I was under the impression that argv[0] gave me the full executable path. If not, how do I obtain this. Cheers Sean.
Oh, sorry, my fault. But in that case you are trying to do smth very strange :) Take a look at the signature of path::filename. It returns a copy of the filename part. You just assign a new value to the temporary string. And than your app tries to delete the executable itself, which is locked by the running process. That's why you get an error. Your intention probably was: path.remove_filename() /= L"compilation date.txt"; if (boost::filesystem::exists(path)) boost::filesystem::remove(path); //should work Regards, Ovanes