How to convert char to array bits?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • helios
    New Member
    • Sep 2008
    • 2

    How to convert char to array bits?

    Hi all,
    I'm resolved problem. and I want anybody need me that convert char to array bits
    char[] ConvertChar2Arr ayBit(char ch)
    {
    char Bits[8];
    ....
    return Bits;
    }
    for example: A
    after converted: 10000010
    Thank you so much.
    Last edited by helios; Sep 21 '08, 06:10 AM. Reason: For example
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    That Bits array is local to that function, i.e. the memory taken by that array is
    stored on the stack and it'll be gone when the function returns.

    kind regards,

    Jos

    Comment

    Working...