Hi, I had a problem in reading a particular string of a text file in C++.
For example, I had a text file that looks like the one below:

Code:
Variable = .iso.org.dod.internet.private.enterprises.9.9.273.1.3.1.1.3.1.8.105.118.116.108.95.97.112.49.0.2.45.4.155.81
Value = Integer32 -44

End of MIB subtree.
I only wanted to read the integer "-44" from the text file in the C++ prog, but I donno how to read it without reading the "Variable = .iso.org.dod.internet.private.enterprises.9.9.273. 1.3.1.1.3.1.8.105.118.116.108.95.97.112.49.0.2.45. 4.155.81
Value = Integer32 " strings.

My partially written code to read the file is given as below:
Code:
apfile=fopen("ap1.txt","r+");

if (apfile==NULL)
{
cout<<"Error opening file ap1.txt"<<endl;
fclose (apfile);
return -1;
}

else
{
while (!feof(apfile)) 
{

}
}
Anyone can help me to get only the integer value of "-44" from the ap1.txt in the C++ programming? Thanks alot for any help!