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.
Printable View
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.Quote:
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:
< > : " / \ | ? *
It's a path. Though I don't know if CreateFile will interpret an absolute path or directory of if it will just accept a filename in the current directory.
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.
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.Quote:
And why don't you just use CFile and CArchive if you are using MFC in the first place??
Alright, no harm done :)