3 ms·
Can you be more specific? I have a counter example (assuming I've understood you): /* C / int foo () { FILE x = fopen("bar"); return 0; } /* C++ */ int
by thedigitalengel 15y ago
Can you be more specific?
I have a counter example (assuming I've understood you):
/* C /
int foo () {
FILE x = fopen("bar");
return 0;
}
/* C++ */
int foo () {
ifstream in("bar");
return 0;
}
- jpr 15y agoC assumes that you know the contracts that calling a function implies. fopen()'s contract requires you to close the file after you are done with it.