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
Member List
Calendar
Today's Posts
Home
Forum
Topic
C
fstream,ifstream,ofstream
fstream,ifstream,ofstream
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
ana butt
New Member
Join Date:
Jul 2015
Posts:
2
#1
fstream,ifstream,ofstream
Jul 28 '15, 06:08 PM
i just need to know why ifstream and ofstream are used ??
weaknessforcats
Recognized Expert
Expert
Join Date:
Mar 2007
Posts:
9214
#2
Jul 28 '15, 10:23 PM
They are part of the C++ Standard Template Library.
I can't answer this until you understand templates and polymorphism.
Until then, you use these if you use the standard library. If you use something else, then you can ignore these.
Comment
Post
Cancel
donbock
Recognized Expert
Top Contributor
Join Date:
Mar 2008
Posts:
2427
#3
Jul 29 '15, 02:43 PM
Is your question: "Why would anybody use
ifstream
or
ofstream
when they could just use
fstream
?"
Comment
Post
Cancel
ana butt
New Member
Join Date:
Jul 2015
Posts:
2
#4
Aug 2 '15, 12:05 PM
yup . i wanna know the clear concepts of ifstream and ofstream,could uh plz tell me a difference briefly...thank s!
Comment
Post
Cancel
donbock
Recognized Expert
Top Contributor
Join Date:
Mar 2008
Posts:
2427
#5
Aug 2 '15, 02:04 PM
ifstream
is for input only.
ofstream
is for output only.
fstream
is for input, or output, or input mixed with output.
fstream
is more powerful, but also more complicated to use.
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment