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:
Variable = .iso.org.dod.internet.private.enterprises.9.9.2126.96.36.199.188.8.131.52.184.108.40.206.220.127.116.11.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. 18.104.22.168.22.214.171.124.126.96.36.199.188.8.131.52.2.45. 4.155.81
Value = Integer32 " strings.
My partially written code to read the file is given as below:
cout<<"Error opening file ap1.txt"<<endl;
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!