indexes are not equal to values

100 views Asked by At

<0776> <0778> [<00a600310030002f0031> <006b> <00a4>] I have this line in text file and i am parsing it and storing the values in

vector<unsigned long long> myVector;

it stored in vector something like this and first two values are always my starting and ending point and in [] is my array values. First two values are keys(range) and in [] are values three values are going to be mapped on keys

console

myVector[0] = 0776 
myVector[1] = 0778
myVector[2] = 00a600310030002f00
myVector[3] = 31
myVector[4] = 006b
myVector[5] = 00a4

//CODE

static qi::uint_parser<unsigned long long, 16, 2, -1> hex_int;
qi::rule<It, std::vector<unsigned long long>()> braced_hex = '<' >> qi::repeat(1,2)[hex_int] >> '>';
bool check1 = qi::phrase_parse(str_line, l, *braced_hex >> *('[' >> *braced_hex >> ']') , qi::space, v_Begin_BF_Range);
string str;
int startingpoint = myVector[0];
for(int i = myVector[0]; i<= myVector[1]; i++)
{
  str = myVector[i - startingpoint];
}

what i want is

0776 = 00a600310030002f0031;
0777 = 006b
0778 = 00a4
0

There are 0 answers