No, "\text.txt" is a valid file name, just as ".\text.txt" or "..\text.txt" are - they are relative filename not absolute filenames, but nevertheless, valid.
no, ".\text" is a name with . + tab + "ext.txt", which is not valid.Use any character in the current code page for a name, including Unicode characters, except characters in the range of zero (0) through 31, or any character that the file system does not allow. A name can contain characters in the extended character set (128–255). However, it cannot contain the following reserved characters:
< > : " / \ | ? *
Last edited by robwhit; 12-19-2007 at 06:28 PM.
Ummmm...
No it is not.
A '\' is not a character. A '\' requires a second character in all cases.
'.\\' or '..\\' is a path
As Robwhit said, the compiler reads '\t' as a TAB, making '.\text.txt' == '. ext.txt'
I suggest you try this in your compiler and report your results.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
And why don't you just use CFile and CArchive if you are using MFC in the first place??
We're talking about real paths here, now how you type them in your compiler
Obviously, in a C++ string, you'd have to type ".\\text.txt", which would translate to ".\text.txt".
Now there's something I just can't agree less with.And why don't you just use CFile and CArchive if you are using MFC in the first place??
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill