Are long-suffix and unsigned-suffix needed when declaring long literals in C++?

前端 未结 4 2060
天命终不由人
天命终不由人 2021-01-07 01:22

I have some ancient memories of writing C code like:

long value = 0;

in the bad old Win16 days and ending up with value being

4条回答
  •  春和景丽
    2021-01-07 02:20

    But this notation is required for wchar_t strings, like

    L"I am a wchar_t string."
    

    and for long long integers, too...

    I guess this is something that should be removed, it isn't useful (the type is declared with its name and not with some suffix), but still supported in C++11.

    Hm.

提交回复
热议问题