Here is a code segment that reads input from infile.dat and sends
output to outfile.dat. What changes are necessary to make the output
go to the screen? (The input is still to come from infile.dat.)
//Problem for Self Test. Copies three int numbers
//between files.
#include
int main( )
{
using namespace std;
ifstream inStream;
ofstream outStream;
inStream.open("infile.dat");
outStream.open("outfile.dat");
int first, second, third;
inStream >> first >> second >> third;
outStream <>
<>
inStream.close( );
outStream.close( );
return 0;
}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here