cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
ifstream efficiency
ifstream efficiency
May 2, 2014 at 9:32pm UTC
RadWayne
(97)
When checking for some character in a text file is it better to read in one character at a time and check it, or to read in one line at a time and loop through each character of the string.
Does either even have a noticeable difference?
May 2, 2014 at 9:37pm UTC
S G H
(2638)
Read a line and loop each character.
The fewer times you require data from files, the faster it goes, but more the memory you will need.
Topic archived. No new replies allowed.