?
Solved

file size limitation?

Posted on 1998-02-05
4
Medium Priority
?
250 Views
Last Modified: 2010-04-10
Using ifstream file("the file"), I tried to search something in the file (.txt). When the size of the file is bigger than 30K something very wrong will happen.

Is this limitation set by C++ or is based on the memory of the PC or something I don't know?
0
Comment
Question by:learn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 160 total points
ID: 1180726
More likely, it is something in your program. There is no file size limitation. If you want, you can post the main loop of your program and we can try to figure out what's wrong.
0
 

Author Comment

by:learn
ID: 1180727
Hi you are 100% right!
After reading your comment, I tried to reduce my code for posting. When the code became simpler, I found the bug: some of the arrays not big enough :-) After increas the size of the arrays, the code just runs fine. Thank you for your help.

btw. how to avoid such mistake? Can C++ check that for us?
0
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1180728
If I answered your question, you should grade the answer. C++ can check if you create a class that does that. However, there's no built-in support for that due to efficiency.
0
 

Author Comment

by:learn
ID: 1180729
Sorry, I haven't got time to read the site.
Thank you for your help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question