For Daily Free Study Material Join wiredfaculty Whatsapp Group | Download Android App | Ncert Book Download
Sponsor Area
Write a definition for function Economic() in C++ to read each record of a binary file ITEMS.DAT, find and display those items, which costs less than 2500. Assume that the file ITEMS.DAT is created with the help of objects of class ITEMS, which is defined below:
class ITEMS { int ID;char GIFT[20]; float Cost; public: void Get() { cin>>CODE;gets(GIFT);cin>>Cost; } void See() { cout<<ID<<':'<<GIFT<<':'<<Cost<<endl; } float GetCost() { return Cost; } };