I know you use fstream.h for files in C++, but what do you use in straight C? I'm just curious.
I know you use fstream.h for files in C++, but what do you use in straight C? I'm just curious.
fread/fwrite/fget*/fput*/fopen/fclose
A whole bunch of 'f'-ing function. :P
Quzah.
Hope is the first step on the road to disappointment.
Ah - thanks. And just one more question - does C offer anyting C++ doesn't? like, would every C program compile under a C++ compiler?
> would every C program compile under a C++ compiler?
No. Due to the way the C++ compiler works (C++ being stricter with error checking) it would likely, depending on the program, require some tweaking. (For example, C++ isn't fond of void pointers.)
Quzah.
Hope is the first step on the road to disappointment.
But other than such conventions (as far as I know, the void * issue is the only point where the two languages have issues), C can't do anything C++ can't.
Callou collei we'll code the way
Of prime numbers and pings!
This explains why one is neither a sub-set or a super-set of the other.
http://david.tribble.com/text/cdiffs.htm
Thank you Salem for the link , that is just what I have been looking for.
rwalt