Difference between char and signed char in c++?

后端 未结 4 2149
小蘑菇
小蘑菇 2020-12-15 03:19

Consider the following code :

#include 
#include 

int main(int argc, char* argv[])
{
    std::cout<<\"std::is_same&         


        
4条回答
  •  情话喂你
    2020-12-15 03:58

    It's by design, C++ standard says char, signed char and unsigned char are different types. I think you can use static cast for transformation.

提交回复
热议问题