Struggling with typecasting - getting into C/C++ variable types

am trying to put to use some example code by replacing it with my own data.

the format needed;

  const char *msg = "hello";
  vw_send((uint8_t *)msg, strlen(msg));  // Send 'hello'

i just want to send one letter, so byte is what i want, right ?

but i can't find the syntax to change that byte to "uint8_t" - what is that anyway, i can't find it here;
http://www.cplusplus.com/doc/tutorial/variables/

this is as far as i got with "hit & miss" trials !!

  msg = uint8_t(keyPress);
  vw_send(msg);

i don't know what keyword to place in front of msg so that the compiler doesn't give me "undeclared" error.

i'm guessing there's possibly another error in the next line with the actual vw_send() - if it has to be a "string" ? then i still need to pass a 'length' parameter ?

byte is essentially an uint8_t, or unsigned char.

the uintX_t format is part of the standard types. It allows you to select an integer of specified width on any platform, where things like int may be different sizes between systems. You can drop the leading 'u' and get signed integer types too.
http://www.nongnu.org/avr-libc/user-manual/group__avr__stdint.html

 const char *msg = "hello";
vw_send((uint8_t *)msg, strlen(msg));  // Send 'hello'

msg is a pointer, the cast has a '*' which signifies a pointer type as well. Its not really doing anything apart from representing the pointers differently.

As the function is accepting a length you can send a single character like this:

 const uint8_t msg = 'h';
vw_send( &msg, 1 );  // Send 'h'

the & is used to return the address of msg ( get its pointer of type uint8_t* ).

We are not sure what this vw_send() looks like. Is it a standard issue in Arduino IDE that I don't know about?

I had a look at virtual wire, it seems like it:
http://www.airspayce.com/mikem/arduino/VirtualWire_8h.html#afe452c485bfe43b1c9088f66ec3b63b2

I see. I thought it was a German car thing.

thanks, pYro !!
compiles okay now; except i dropped the const after;
invalid conversion from 'const uint8_t*' to 'uint8_t*'

liudr:
We are not sure what this vw_send() looks like. Is it a standard issue in Arduino IDE that I don't know about?

it's from the VirtualWire library with the following in the documentation;

vw_send

  extern uint8_t vw_send(uint8_t* buf, uint8_t len);

Send a message with the given length. Returns almost immediately, and the message
will be sent at the right timing by interrupts. Returns true if the message was accepted
for transmission. Returns false if the message is too long (>VW_MAX_PAYLOAD).