You need to read your file first and build an array, or better still a std::map
] of the contents. As you read the file you need to split the strings into code and description, using the
signs as delimiters, and building you map from the two strings. Then it is just a simple matter of using the input from the user to look up the title in the map.