FILE HANDLING C++ PROGRAM

Description

FILE HANDLING C++ PROGRAM

Shared by: zuhaibriaz
Categories
Tags
C++
-
Stats
views:
86
posted:
9/21/2012
language:
Unknown
pages:
1
Document Sample
scope of work template
							Program file handling


# include <iostream.h>
# include <stdlib.h>              // Header Files
# include <fstream.h>

main(int a, char**b)
{

char name[50];
char sal[70];
char dep [80];

ifstream f;

char NoF[] = "myfile.txt";

f.open (NoF);

if (!f)
{
cout<<"Unable to open file\t"<<NoF<<'\n';
//exit();
}

while (!f.eof())
{

f>>name>>sal>>dep;
cout<<name<<'\t'<<sal<<'\t'<<dep<<'\n';
for(int i=0;i<1500500; i++)
{
}
}
f.close();
cout<<*b<<endl;
system("PAUSE");
}

						
Related docs
Other docs by zuhaibriaz
CALL BY REFERNCE PROGRAM C++
Views: 2  |  Downloads: 0
C++ PRROGRAMING stucture and union LECTURE
Views: 12  |  Downloads: 1
SORTED NUMBER C++ PROGRAMING LECTURE
Views: 10  |  Downloads: 0
NUMBER OF FACTORIAL C++
Views: 10  |  Downloads: 0
LOWER TO UPPER CASE C++
Views: 10  |  Downloads: 0
C++ one less than numbeR PROGRAM
Views: 2  |  Downloads: 0
PRACTCE LAB OOP C++ PROGRAMING
Views: 16  |  Downloads: 0
array manipulation using indexing
Views: 7  |  Downloads: 0
POINTERS C++ LECTURE
Views: 8  |  Downloads: 0
C++ SERIES SEQUENCE FULL PROGRAM
Views: 5  |  Downloads: 0