can you declare data in a char** using hex?

Posted by bstullkid on Stack Overflow See other posts from Stack Overflow or by bstullkid
Published on 2010-05-22T19:04:26Z Indexed on 2010/05/22 19:10 UTC
Read the original article Hit count: 183

Filed under:

lets say I have this

char *something[] = { 
    "/bi", 
    "-c", 
    "5", 
    NULL, 
    NULL 
};

but I want to declare it in hex, how would I do this; compiler keeps erroring out on me:

char *something[] = { 
    {0x2f,0x62,0x69},
    {0x2d,0x63},
    {0x35},
    {0x00}, 
    {0x00}
}; 

© Stack Overflow or respective owner

Related posts about c