Home > Back-end >  Save the children, not really
Save the children, not really

Time:09-26

Briefly describe the following code, and to assess the function of the following procedures:
# include & lt; Fstream>
# include & lt; iostream>
using namespace std;
Int main (int arg c, char * argv [])
{char c;
Fstream fio (argv [1], the ios: : | in ios: : out);
If (fio) fail ())//open the file monitor success
{cerr & lt; <"Always open a file:" & lt; While ((c=fio. The get ())!=(EOF)//determine whether arrived at the end of the file
If (isupper (c))
{fio. Seekg (- 1, the ios: : cur); Fio. Put (tolower (c)); }
Fio. Close ();
return 0;
}
Prev:c
  • Related