IOTest -, ios::app) if...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 // IOtest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <fstream> #include <iostream> using namespace std #define BEGIN { #define END } int _tmain(int argc, _TCHAR* argv[]) BEGIN ofstream testout char infilename[20] cerr << "this is a message" << endl cout << "please enter a file name: " cin >> infilename cout << "the file name is: " << infilename << endl cout << "building file" << endl
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview:, ios::app) if ( BEGIN cout << "file not opended successfully" << endl END else BEGIN cout << "file opend successfully" << endl END testout << "this is a test" << endl testout.width(9) testout.setf(ios::fixed) testout.precision(3) testout << 6 << endl testout.width(9) testout << 3.4312548 << endl testout.close() return 0 END...
View Full Document

This note was uploaded on 03/19/2008 for the course CSE 122 taught by Professor Yoxheimer,ericch during the Fall '07 term at Pennsylvania State University, University Park.

Ask a homework question - tutors are online