CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: vincegata

Search: Search took 0.02 seconds.

  1. Re: [RESOLVED] unsigned char c = -1; // c has value 255, why is that?

    I do use -Wall but for release code only, thank you for a tip.
  2. Re: [RESOLVED] unsigned char c = -1; // c has value 255, why is that?

    Ok, I see, thank you.
  3. Re: [RESOLVED] unsigned char c = -1; // c has value 255, why is that?

    I know how it's calculated: e.g. (-1 modulo 256) + 256 = 255, I am wondering about the internals.

    Btw, "C++11 Clause 4.7 - Integral conversions" is it from the C++ standard? Where can I get?
  4. Re: unsigned char c = -1; // c has value 255, why is that?

    Thanks.
  5. [RESOLVED] unsigned char c = -1; // c has value 255, why is that?

    Hello,

    So, the

    unsigned char c = -1; // c has value 255

    Why is that, on a bit level? Negative sign would set the highest bit to 1, and 1 would set the lowest bit to 1: 10000001 which is...
Results 1 to 5 of 5





Click Here to Expand Forum to Full Width

Featured