Hi,
this is for you member and just try to see the output and tell whether you like it or not ?
int main()
{
ofstream outf("ITEM");
cout <<"Enter item name:";
char name[30];
cin >> name;
out f <<name << "\n";
float cost;
cin >> cost;
outf << cost << "\n";
out f,close();
if stream inf ("ITEM");
inf >> name;
inf >> cost;
cout <<"\n";
cout << " Item name:" << name << "\n";
cout << "It"em cost :" << cost <<"\n";
inf .close ();
return 0;
}