Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
How do I open a file and store the contents of that file into a character array?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
TRkats
New Member
Join Date:
Jan 2014
Posts:
1
#1
How do I open a file and store the contents of that file into a character array?
Jan 2 '14, 11:34 PM
I am trying to store a large text file into an array so I can count the number of characters.
donbock
Recognized Expert
Top Contributor
Join Date:
Mar 2008
Posts:
2427
#2
Jan 3 '14, 04:24 AM
Might the text file be so big that your program can't allocate enough RAM to hold it? If so, then you'll need a different approach.
Is you only interest counting the number of characters in the file? You can do that without constructing an image of the entire file in an array.
Comment
Post
Cancel
weaknessforcats
Recognized Expert
Expert
Join Date:
Mar 2007
Posts:
9214
#3
Jan 3 '14, 06:35 AM
Are you using C++? Or C ?
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment