MessageID, CorrelID and GroupID are all byte arrays. Hence they can't be assigned the way you are trying to. Instead do the following to get messageID. You can try out similarly for CorrelationID and GroupID.
if ( queue.get( msg, gmo ) )
{
// Get the message id
char byMessageId[24];
ImqBinary msglId = msg.messageId();
// Copy the message to a buffer.
msglId.copyOut(byMessageId,24);
}
Hope this helped.