Re: stdio vs fstream - C++
Quote:
Originally Posted by Chazwazza
Is there a reason I should use functions from the fstream header rather than just using fputs from stdio if all I want to do is input a string to a text file depending on what button a user presses? There is no user supplied input so I don't need to worry security vulnerabilities or anything. All using fstream seems to do is make my exe so much bigger when all I want to do is something simple. So is it ok to use this simple function? I'm only asking because I have heard to steer clear of certain things because they have inherent problems.
So fstream is bloating your exe from 40 or 50 kb to 100 kb? Not a big jump considering the advantages of the standard library. fputs is old C code but fstream and the standard library is C++. I would say everything in the standard library is more robust, safe, and easier to use than anything C.