473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 3454
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.