I need simple program in C++ that will open text file and going line by line find second argument by knowing first in list.
Content of text file:
1, red
2, blue
3, green
4, orange
So I need a program that will go line by line and each line turn into array ( of two elements ) and then compare first element with user interactively inserted number.
So if user insert 2, it goes line by line, comparing first element of array-ed line and if it matches, it prints second element in array ( blue ), and if user type 3, it prints green...
I have always working in PHP, and it's much easier than this, so I am stuck a little bit with this now... :/