Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have one file and this file contain line like this :-

KeyValue=45AD34 NumberOfPages=2
KeyValue=33AD46 NumberOfPages=1

i want to put only numeric value in vector. plz tell me
Posted
Comments
KM Perumal 2-May-13 8:52am    
What Output u want

use string tokenize method to find out the '=' symbol from there upto some data length move into vector.if u need any clarification will check it further.
 
Share this answer
 
Read the documentation on the string class[^]. It provides many useful functions for manilulating character strings.
 
Share this answer
 
If your file format is really that simple (that is fixed length fields) you may easily (processing line by line) extract the substrings (based on their position inside the line) of interest and then add them to the vector.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900