Problem Statement - 04B-2019S-C1
Write a user-defined function TotalPrice() in C++ to read each object of a binary file STOCK.DAT, and display the Name from all such records whose Price is above 150. Assume that the file STOCK.DAT is created with the help of objects of class Stock, which is defined below:
class Stock
{
char Name[20]; float Price;
public:
char* RName() { return Name; }
float RPrice() { return Price; }
};
Solution
CSKC| Created: 8-Apr-2019 | Updated: 10-Apr-2019|CBSE12A-2019