Re: opteron, VS2005 beta, win64: std::streamsize is 4 bytes?
- From: "Bo Persson" <bop@xxxxxx>
- Date: Sat, 3 Dec 2005 11:00:35 +0100
"noel" <noel@xxxxxxxxxxxxxxxxxxxxxxxxx> skrev i meddelandet
news:32E8C63B-840C-4DCC-91E9-05E1DB25F720@xxxxxxxxxxxxxxxx
>i need to open files > 2GB. on two seperate platforms, i'm trying to
>compile
> a win32 console application that looks like:
>
> #include <fstream>
> #include <iostream>
> int main(void)
> {
> std::cout << sizeof(std::streamsize) << "\n";
> }
>
> that outputs 4. i want to open larger files, so i #define _WIN64 in
> the
> solution explorer. when i use this preprocessor definition, i get
> "size_t
> redefinition" errors.
>
> 1) how can i get an 8 byte std::streamsize on my opteron + win64 +
> VS 2005?
> 2) how can i get an 8 byte std::streamsize on this p4 + win2000 +
> VS 2003?
You can't. Streamsize cannot be larger than the largest integer type
in C++, which is long.
You can use larger files though, as long as you either read them
sequentially or seek with a distance smaller than 2 GB.
Bo Persson
.
- Follow-Ups:
- Re: opteron, VS2005 beta, win64: std::streamsize is 4 bytes?
- From: Mark Randall
- Re: opteron, VS2005 beta, win64: std::streamsize is 4 bytes?
- Prev by Date: Re: registerhotkey
- Next by Date: Re: registerhotkey
- Previous by thread: RE: Help -> error : _CrtIsValidHeapPonter -> see code attached
- Next by thread: Re: opteron, VS2005 beta, win64: std::streamsize is 4 bytes?
- Index(es):
Relevant Pages
|