Read file content into string array.
int okutil_read_text_file_lines( LPCSTR lpcszPath, StringArray * psa, int nLines )
number of lines read or -1 if file open error
EX1
void rf(int nLines = 10) { string strPath = GetOriginPath(ORIGIN_PATH_SYSTEM) + "\\Samples\Graphing\\Axes.dat"; StringArray sf; int nn = okutil_read_text_file_lines(strPath, &sf, nLines); out_int("num lines = ", nn); for(int ii = 0; ii < sf.GetSize(); ii++) { printf("%d: %s\n", ii+1, sf[ii]); } }
origin.h