I have a string vector and a self declared type of unsigned char:

```
std::vector<std::string> result;
typedef unsigned char BYTE;
BYTE data[11];

```

I have assigned values to result. Now I want to copy the elements of `result` into `data`:

```
for ( int i=0; i<11; i++)
{
    data[i] = result[i];
}

```

But it gives out error, saying `No suitable conversion function from std::string to BYTE exists`. 

How can I handle this? 

**Update:**

First, thank you all for your precious comments and answers. 
In my code, my `result` is of six elements like these values:

```
0x30
0x31
0x32
0x33
0x34
0x35

```

I tried as Raxvan's answer, but at the end, `data` only captures the first value of those string elements, that is, all zeros. What I actually want to do is to let `data` have the same values as `result`, but of `BYTE` type, so that it is similar to assigning values like this:

```
BYTE data[] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35 } // this line works correctly

```