Although your question is not very specific, here are 3 popular methods that won't let you down:
1. JSON, with a parsing library available in most languages. JSON is easier to read and edit, smaller than XML and works with RESTful APIs and internet technologies all over the world now.
2. XML. XML is also easily consumed and parsed in most languages. It is older and somewhat clunkier, but it is still being used in many commercial game engines as a general data format.
3. Design a database using SQLite. This is a file based database format that can be easily consumed in C++ and most other languages. If you know SQL and relational database concepts, this is a powerful way to store and query your game data.
My opinion is that writing custom text file parsers is a waste of time compared to these options, unless you have to do something so extraordinary with it that it makes it impossible to use all of these methods.