Passing values into const char *msg


i am using the virtual wire library which can be found at here is a snippet of the code that is relevant.

const char *msg = "hello";

    vw_send((uint8_t *)msg, strlen(msg)); // command to send the data 

msg can hold upto 27 bytes of data as per the documentation of the library. what i would like to do is manipulate each of the bytes separately so lets say we write some code like

int b1 = 0x01;
int b2 = 0xa0;
int b3 = 0xFF;
and so on.

all of those values will be manipulated elsewhere in the code. would it be possible to pass all the values from b1 to b27 into msg ? so that i can send all the information in one go using

vw_send((uint8_t *)msg, strlen(msg));

here is what i am trying to do, so you can better understand and guide me. I wish to have 3 transmitter and 2 reciever, they will be transmitting at different intervals. when the data is transmitted, on the receiver end, i want to be able to understand where this data came from and where it needs to go.

so transmitter 1 when trying to contact receiver 1 would send something like

0x01 0x01 followed by the data

trasmitter 2 when trying to contact receiver 1 would send something like

0x02 0x01 followed by the data

and on the receiver side and i can use an if statement and check the first byte and understand, this data is coming from transmitter 1 or transmitter 2.

You can't change anything about msg as long as that const modifier is in front of it.

If you remove the const modifier then you can treat msg as an array of characters. For instance here, msg[0] == 'h', msg[1] == 'e', msg[2] == 'l', and so on. You can change each one individually to suit your liking.

The other thing to remember is that the spot after the last letter HAS TO be Null. Make it equal to zero. So in this case, msg[5] == 0. That let's other functions that are using this string know where it ends. Otherwise code like print() would keep on going forever until they reach a zero.

I'm confused by b1, b2, and b3 which are all defined as ints. How are 27 of them going to fit into 27 bytes of msg, regardless of the const issue?

thank you both for your replies. i have solved what it was that i needed to do.
@econjack i had not realized that int actually takes up 2 bytes. this was one of the clues that helped in solving the matter

@delta thanks, even if that was not exactly what i was looking for, did help me learn something.
here is how i solved it.

on the transmitter side,

uint8_t data[27] ;
    int dummy = 0x00;
    for (int i =0; i<27; i++){
      data[i] = dummy;
      dummy ++;

vw_send((uint8_t *)data, sizeof(data));

i realize that the final answer is totally different from my inital question. but in the end im happy i got the solution.