Which initializer is appropriate for an int64_t?

后端 未结 3 1915
梦谈多话
梦谈多话 2020-12-09 18:33

I like to initialize my variables to some \"dummy\" value and have started to use int64_t and uint64_t. So far, it looks like there are at least th

3条回答
  •  长情又很酷
    2020-12-09 18:57

    Personnally, I would use the third, which is the most portable way to achieve this.

    #include 
    
    int64_t method_three  = INT64_C(0);
    uint64_t method_three = UINT64_C(0);
    

    Anyway, I don't think it's a very important thing.

提交回复
热议问题