|
-
Apr 9th, 2005, 08:34 AM
#1
Thread Starter
transcendental analytic
ifstream error
Is there a way of knowing what error occurred when an ifstream seekg failed?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Apr 9th, 2005, 09:07 AM
#2
Thread Starter
transcendental analytic
Re: ifstream error
nm that, seekg doesn't seem to be able to handle files over 2G, is there any way around this?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Apr 9th, 2005, 02:09 PM
#3
PowerPoster
Re: ifstream error
I have read a bit about that, not much though it did just kinda pop up in an article. If I remeber the solution had something to do with splitting up the file into 2GB slices, or something like that.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Apr 9th, 2005, 02:37 PM
#4
Thread Starter
transcendental analytic
Re: ifstream error
I have solved it temporarily by using windows api's instead with SetFilePointerEx, but its kind of annoying. What do you mean split up the file in 2GB slices? into new files or just splitting the area where you read?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Apr 12th, 2005, 02:39 PM
#5
Re: ifstream error
You could also try finding an I/O stream that uses a 64-bit streamoff type. After all, just because the MS implementation is stupid enough to use 32-bit types doesn't mean others are, too.
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
|