C++ program to search data from a particular list of data in a linear fashion