When is using stdio preferable to fstream?
Posted
by
Karl Bielefeldt
on Programmers
See other posts from Programmers
or by Karl Bielefeldt
Published on 2012-09-19T16:21:44Z
Indexed on
2012/09/19
21:49 UTC
Read the original article
Hit count: 235
I work on a well-established, embedded C++ code base. We have been using a proprietary API to our filesystem. For better integration with third-party C libraries, we are currently in the process of implementing most of stdio.h
and fcntl.h
. I made what I thought was a non-controversial proposal that we should also implement the fstream class and encourage new C++ code to use it instead of the new (to our code base) C-style API. We already have the stdout
parts of iostream
available, although it is not widely used.
Given a choice between using stdio
and fstream
, what are good reasons to choose stdio
for embedded software development in C++?
© Programmers or respective owner