Line 13: If the open failed, you output a message, but then continue on as if nothing adverse had happened.
Line 9: You're trying to cin to a string, but you haven't included the <string> header.
Line 11: It should be filename.c_str() not ,
Line 20:
const double
doesn't declare any variables.
Line 21-24,25-28: Books, CDs, Pens,Pencils are all undefined variables.
You're outputting the same information twice. Once at lines 16-19 and again at lines 25-28. This is not in the form of a table.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.