|
-
Dec 30th, 2002, 03:34 AM
#1
Thread Starter
Hyperactive Member
How to lock read/write using fstream (or ifstream)
Ok, when using "#include <fstream.h>" using file_buf::sh_read or any of the sh_*'s work just fine. But when using "#include <fstream>", they don't work. Even when im "using std::filebuf" ... Says sh_*'s are not part of filebuf namespace or whatever.... So how do you get them to work, or is there some other way you're meant to lock files with <fstream> ?
-
Dec 30th, 2002, 07:11 PM
#2
You can't specify a lock mode with the new headers. Apparently it was thought useless or maybe non-portable, I don't know. It's no longer part of the ANSI standard (or maybe it never was, only an extension of M$).
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 1st, 2003, 09:20 PM
#3
Thread Starter
Hyperactive Member
That sucks Guess I'm stuck using old headers when I need locking capabilities
-
Jan 1st, 2003, 09:51 PM
#4
I think the new always lock the files completly. What do you need the capabilites for?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|