#include #include using namespace std; int main() { ofstream inch; //output file stream inch.open("c:/mycpp/inches.txt"); //associates the name inch with a file if (inch.fail()) //maybe the location doesn't exist, or it is full, or protected cout<<"File error\n"; //cout is used to notify user of error else { //create table by writing to inch inch<<"INCHES\tCM\n"; //print heading for(int inches=1; inches<20; inches++) inch<