什么是“L”是否在整数字面量的结尾? [英] What does the "L" mean at the end of an integer literal?

查看:176
本文介绍了什么是“L”是否在整数字面量的结尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个常数:

  #define MAX_DATE 2958465L 
解决方案

它是什么意思?是 long 整数文字。



整数文字的类型为 int 默认情况下; L 后缀给它一种类型 long (注意,如果值不能由 int ,则文字将具有 long 的类型,即使没有后缀)。


I have this constant:

#define MAX_DATE  2958465L

What does the L mean in this sense?

解决方案

It is a long integer literal.

Integer literals have a type of int by default; the L suffix gives it a type of long (Note that if the value cannot be represented by an int, then the literal will have a type of long even without the suffix).

这篇关于什么是“L”是否在整数字面量的结尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆