博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MB_LEN_MAX常数,带C ++示例
阅读量:2530 次
发布时间:2019-05-11

本文共 1615 字,大约阅读时间需要 5 分钟。

C ++ MB_LEN_MAX宏常量 (C++ MB_LEN_MAX macro constant)

MB_LEN_MAX constant is a macro constant which is defied in climits header, it is used to get the maximum number of bytes in a multibyte character, for any locale, it returns maximum number of bytes that a multibyte character, which is 1 or more than it.

MB_LEN_MAX常数是在climits标头中定义的宏常数,用于获取多字节字符中的最大字节数,对于任何语言环境,它都返回一个多字节字符的最大字节数,即大于或等于1

Note:

注意:

  • The actual value depends on the compiler architecture or library implementation.

    实际值取决于编译器体系结构或库实现。

  • We can also use <limits.h> header file instead of <climits> header as MB_LEN_MAX constant is defined in both of the libraries.

    我们也可以使用<limits.h>头文件代替<climits>头文件,因为在两个库中都定义了MB_LEN_MAX常量

Syntax of MB_LEN_MAX constant:

MB_LEN_MAX常数的语法:

MB_LEN_MAX

Example:

例:

Constant call:    cout << MB_LEN_MAX;    Output:    16

C ++代码演示带有climits标头的MB_LEN_MAX常量示例 (C++ code to demonstrate example of MB_LEN_MAX constant with climits header)

// C++ code to demonstrate example of // MB_LEN_MAX constant with climits header#include
#include
using namespace std;int main(){
//prinitng the value of MB_LEN_MAX cout<<"MB_LEN_MAX: "<
<

Output

输出量

MB_LEN_MAX: 16

C ++代码演示带有limits.h头文件的MB_LEN_MAX常量的示例 (C++ code to demonstrate example of MB_LEN_MAX constant with limits.h header file)

// C++ code to demonstrate example of // MB_LEN_MAX constant with 
header file#include
#include
using namespace std;int main(){
//prinitng the value of MB_LEN_MAX cout<<"MB_LEN_MAX: "<
<

Output

输出量

MB_LEN_MAX: 16

翻译自:

转载地址:http://tatzd.baihongyu.com/

你可能感兴趣的文章
POJ 1141 Brackets Sequence
查看>>
Ubuntu 18.04 root 使用ssh密钥远程登陆
查看>>
Servlet和JSP的异同。
查看>>
虚拟机centOs Linux与Windows之间的文件传输
查看>>
ethereum(以太坊)(二)--合约中属性和行为的访问权限
查看>>
IOS内存管理
查看>>
middle
查看>>
[Bzoj1009][HNOI2008]GT考试(动态规划)
查看>>
Blob(二进制)、byte[]、long、date之间的类型转换
查看>>
OO第一次总结博客
查看>>
day7
查看>>
iphone移动端踩坑
查看>>
vs无法加载项目
查看>>
Beanutils基本用法
查看>>
玉伯的一道课后题题解(关于 IEEE 754 双精度浮点型精度损失)
查看>>
《BI那点儿事》数据流转换——百分比抽样、行抽样
查看>>
哈希(1) hash的基本知识回顾
查看>>
Leetcode 6——ZigZag Conversion
查看>>
dockerfile_nginx+PHP+mongo数据库_完美搭建
查看>>
Http协议的学习
查看>>