Results 1 to 1 of 1
Thread: C++
Hybrid View
-
10th May 2010 17:12 #1
C++
, :
) , , (N) ; N , ( ), , , .
) :
) , .
) : ( ) .
,
Code:#include<iostream> #include<fstream.h> using namespace std; struct de { int broi,clas,nomer,dohod; char name[10]; double uspeh;}; void vhod(ofstream & outf) { de S; outf.open("info.cpp"); while(cin>>S.broi >>S.clas >>S.nomer >> S.dohod >>S.name >>S.uspeh) outf.write((char*)(&S),sizeof(de)); outf.close();} void izhod(ifstream &intf) {de d; intf.open("info.cpp",ios::in|ios:: out|ios::binary); while(intf.read((char*)(&d),sizeof(de))); cout<<d.broi<<" "<<d.clas<<" "<<d.nomer<<" "<<d.dohod<<" "<<d.name<<" "<<d.uspeh<<" " <<"\n"; intf.close(); } void update(fstream &f,char ime[20],int broi) { de d;int i=0; f.open("info.cpp",ios::in|ios:: out|ios::binary); while(f.read((char*)(&d),sizeof(de))); {
,




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in