Of course it is possible though text processing can be difficult. The simplest way to do this is a text in stream. These classes have very similar syntax to your console streams.
Then you need to come up with a format.
Here is an example
Beer 12 pack
As you can see there is a repeating format here. Every data field has it's own line ( the delimiter ). Each product has its string name, and its price.
When you parse this you can create a vector of products ( think Products class or struct ) to hold your data.
Bonus points, give each product a uniqueID ( not a string ) that can be used for identification within your app.