I want a name displayed when the letters beside it is entered from the keyboard
eg when "ABC" is entered, Abraham is retrieved from .txt file
when "CME" is entered, Camille is retrieved from .txt file

A sample of the text file is below:

CODE NAME
ABC Abraham
CME Camille
JUN Junior

in my header file I have

class person
{    
     public:

     private:
             char code[3];
             char name[21];
};

Thanks

Princequarles.

jbennet commented: read the rules -6
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.