472,952 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,952 software developers and data experts.

What is sizeof(std::streamsize) ?

Hi,

I was trying to work around the #define _LARGEFILE_SOURCE/
_FILE_OFFSET_BITS... nightmare to get large file support in C,
thinking that things were nicely done in C++. But at least on my
compiler the size of std::streamsize is 4 !
How am I supposed to deal with large file in this case ?

Thanks,
-Mathieu
Ps: for some reason a google search did not reveal anything
interesting...
Mar 6 '08 #1
2 3440
mathieu schrieb:
I was trying to work around the #define _LARGEFILE_SOURCE/
_FILE_OFFSET_BITS... nightmare to get large file support in C,
thinking that things were nicely done in C++. But at least on my
compiler the size of std::streamsize is 4 !
How am I supposed to deal with large file in this case ?
Use the nativce operating system API.
Marcel
Mar 6 '08 #2
On Mar 6, 5:22 pm, Marcel Müller <news.5.ma...@spamgourmet.comwrote:
mathieu schrieb:
I was trying to work around the #define _LARGEFILE_SOURCE/
_FILE_OFFSET_BITS... nightmare to get large file support in C,
thinking that things were nicely done in C++. But at least on my
compiler the size of std::streamsize is 4 !
How am I supposed to deal with large file in this case ?

Use the nativce operating system API.

$ wc boost_1_34_1/libs/filesystem/src/operations.cpp
1298 5115 46354 boost_1_34_1/libs/filesystem/src/operations.cpp

Great... all I wanted was simply the file size of a file...

-Mathieu
Mar 6 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: William Payne | last post by:
Hello, when I was writing a user-driven test program for a data structure I wrote, I encountered an annoying problem. The test program is laid out as a menu with several numbered options. The user...
5
by: Chris Mantoulidis | last post by:
Let's say I have this: std::string s1; std::cin >> s1; This will read s1 from cin until it finds a space (or a newline, whichever comes first). Okay this works. But when I want to continue...
4
by: Christopher | last post by:
I am using std::string to parse a command given by the user, I don't understand why the following snippet is not working as expected. string buffer, // store commands from...
1
by: Alex Vinokur | last post by:
I have several questins concerning a program below. ------ foo.cpp : BEGIN ------ #include <cassert> #include <cstdlib> #include <iostream> #include <fstream> using namespace std; int...
6
by: Jason K | last post by:
Let me preface this by saying this obviously isn't a C++ *language* issue per se; rather probably an issue relating to quality of implementation, unless I'm just misusing iostream... I wrote a...
5
by: ma740988 | last post by:
Consider the source: # include <iostream> # include <string> # include <fstream> # include <vector> # include <sstream> using namespace std;
3
by: puzzlecracker | last post by:
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); I have seen it in faq - what does it do, exactly?
13
by: Gianni Mariani | last post by:
What I would like to do is read bytes from a stream, any number and any time. I would like it to wait until there are any bytes to read. I want the exact same functionality as cstdio's "fread"...
9
by: Notebooker | last post by:
Hello, I'm an intermediate noob reading-in data from ascii-file using an ifstream object. I have specified a c-style string buffer with size of type size_t and I am specifying to use this...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.