Description

Read specified lines from a text file into an array of strings.

Syntax

int ReadFileLines( StringArray & saLines, LPCSTR lpcszFile, uint iNumLines = 0, uint iFirstLine = 0, uint iSkipLines = 0 )

Parameters

saLines
[output]Reference to a string array that will hold the lines
lpcszFile
iNumLines
[input]Number of lines to read into the string array. If 0 then all lines are read.
iFirstLine
[input]Zero based index of the first line to read into the string array.
iSkipLines
[input]Number of lines to skip after every one line read.

Return

Returns zero for success or non-zero to indicate error.

Examples

EX1

int ReadFileLines_ex1()
{
StringArray saLines;
}