#include <iostream.h> #include <fstream.h> #include <conio.h> struct st { int rollno; char name[23]; float marks; }; void main() { clrscr(); st aa; ifstream g; g.open("fd2.dat",ios::binary); while(!g.eof()) { g.read((char*)&aa,sizeof(aa)); cout<<aa.rollno<<endl; cout<<aa.name<<endl; cout<<aa.marks; } g.close(); }
debug
aa
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)