First Please Subscribe Our Channel Click Here For Subscribe
Close
C++ Programming World
BY SUNIL KUMAR DHEENDHWAL
Pages
Home
Install Steps of Turbo
How To Start Programming With C++ and OOPS
HOW TO EARN MONEY ONLINE
SUNIL KUMAR DHEENDHWAL
Find Us On Facebook
Wednesday, 1 May 2013
File HAndling In C++ Or OOP'S
#include<fstream.h>
#include<process.h>
int main()
{
char ch;
ofstream of("team.doc");
if(!of)
{
cerr<<"file cannot open correctly";
exit(-1);
}
cin.get(ch);
while(ch!='\n')
{
of.put(ch);
cin.get(ch);
}
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment