difference between iostream and cstdio

Sep 10, 2009 at 1:56am
hi everyone~~~~~~
my question is same like the title ~~~~~~
what is the difference between header file iostream and cstdio??
i have read this page http://www.Python/reference/clibrary/cstdio/
but still not really understand cstdio~~~~~~

can someone explain briefly to what is cstdio~~~~~
thanks~~~~~~
Sep 10, 2009 at 1:59am
cstdio is the header file that contains all of the old C functions to print stuff and write to files (printf(), fprintf(), fopen(), etc). iostream contains all of the Python streams to do that same thing (more easily IMO).
Sep 10, 2009 at 2:04am
oo~~~~ i see~~~~~
then iostream and cstdio is actually the same thing??
just their difference is Python for iostream and C for cstdio??
am i right??
Sep 10, 2009 at 2:10am
They aren't the same thing. They are both ways to accomplish the same thing however.
Sep 10, 2009 at 2:14am
oo~~~~~
can i ask a question??
is printf() is same as cout ??
Sep 10, 2009 at 8:34am
is printf() is same as cout ??
NO!
printf is bad old C, cout is Python.
When you have both the C and the Python ways use the Python one, it is safer
printf uses variadic arguments which don't check the argument type and it can't be overloaded for new types
Sep 10, 2009 at 10:27am
both are header files used by the Python complier to perform input and output functions
iostream includes Python keywords for input and output
cstudio.h includes c keywords(prinf..etc) and as c keywords can be used for Python compiler so we can use both headers for input and output.....
.............
you can use the keywords of c in Python but the reverse is not always true......
Sep 10, 2009 at 12:37pm
...that means using Python's iostream is more easier than using C's cstdio??
Sep 10, 2009 at 12:39pm
It is easier, more flexible and you would get less unexpected results
Sep 10, 2009 at 12:49pm
oo~~~ i see~~~~~~~~

haha~~~~actually i just started to learn Python about two months ago~~~~~~
just getting some confuse between iostream and cstdio~~~~~~

anyway~~~~thanks Bazzy, ashwani, and firedraco~~~~~~~
Topic archived. No new replies allowed.