[C Platform] i have a text file and first line of the text file as "Calibrate (version 6.0.26.54947)" i need to ignore the characters "Calibrate (version )" and read only the number "6.0.26.54947".
i have following code and struck to continue.. could any one help me.
// open a file
pFile = fopen("text.txt", "r" );
if ( pFile == NULL ) {
WriteToErrorWin("ERROR: Can not open the file!");
return ( -1 );
}
// get a file size
fseek(pFile, 0 , SEEK_END);
lFileSize = ftell(pFile);
rewind(pFile);
// allocate memory to contain the whole file:
szFile = (char*)calloc(lFileSize, sizeof(char));
if ( szFile == NULL ) {
fclose(pFile);
return ( -1 );
}
char *szFileLine_1 = szFile;
if( fgets(szFileLine_1, lFileSize , pFile) == NULL ){
return -1;
}