Reading integers from a text file

Hi everyone,

I have a file on my SD Card named "values.txt". It contains 6 values on first 6 lines and each line is an integer. e.g.

123
220
98
338
12
196

Like this. I want these values read in arduino through SD Card as integers. Can anyone help me regarding this problem. Many thanks!

Read chars to string until you see CR/LF. Then funkction toInt to get the integer like this:
String ss="413"; // string composed from digits from SD-Card
int nn=ss.toInt();