c_-_files:file_copy
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
c_-_files:file_copy [2017/10/12 15:10] – peter | c_-_files:file_copy [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== C - Files - File Copy ====== | ====== C - Files - File Copy ====== | ||
- | <code c> | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | |||
- | void main() | ||
- | { | ||
- | clrscr(); | ||
- | char ch,st[100]; | ||
- | ofstream o(" | ||
- | |||
- | do | ||
- | { | ||
- | ch=cin.get(); | ||
- | fflush(stdin); | ||
- | o.put(ch); | ||
- | } while(ch!=' | ||
- | |||
- | o.close(); | ||
- | ifstream i; | ||
- | i.open(" | ||
- | ofstream k; | ||
- | k.open(" | ||
- | |||
- | while(!i.eof()) | ||
- | { | ||
- | i.read((char*)& | ||
- | k.write((char*)& | ||
- | cout<<" | ||
- | cout<< | ||
- | } | ||
- | |||
- | getch(); | ||
- | } | ||
- | </ | ||
c_-_files/file_copy.1507821029.txt.gz · Last modified: 2020/07/15 09:30 (external edit)