Get the line into the string, then you would have to search for the = and then either return whatever is after that, or convert it to an int/whatever and return it.
@ Alexandro: Since I've given an example about 10 times for this very specific job, I will not show you code. However, I will mention that there are examples all over this forum concerning this and there are containers inside of the Standard Library that will help you accomplish this called the 'ifstream'. The task you need to accomplish goes like this:
Declare buffer
Read file into buffer
Interpret buffer
Free buffer (depends on your buffer)