MB_LEN_MAX常數,帶C ++示例

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<iostream>
#include<climits>
using namespace std;
int main()
{
//prinitng the value of MB_LEN_MAX
cout<<"MB_LEN_MAX: "<<MB_LEN_MAX<<endl;
return 0;
}

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 <limits.h> header file
#include<iostream>
#include<limits.h>
using namespace std;
int main()
{
//prinitng the value of MB_LEN_MAX
cout<<"MB_LEN_MAX: "<<MB_LEN_MAX<<endl;
return 0;
}

Output

輸出量

MB_LEN_MAX: 16

翻譯自: https://www.includehelp.com/cpp-tutorial/MB_LEN_MAX-constant-with-example.aspx

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/541360.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/541360.shtml
英文地址,請注明出處:http://en.pswp.cn/news/541360.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

php谷歌收錄接口,php實現查詢百度google收錄情況(示例代碼)

PHP$SEOdetail array();$domain !empty($_GET[q]) ? $_GET[q] : www.mycodes.net;baidudetail($domain);googledetail($domain);var_dump($SEOdetail);function baidudetail($domain) {$baidu_site http://www.baidu.com/baidu?wordsite%3A . $domain;$baidu_link http:/…

Linux學習第三步(Centos7安裝mysql5.7數據庫)

版本&#xff1a;mysql-5.7.16-1.el7.x86_64.rpm-bundle.tar 前言&#xff1a;在linux下安裝mysql不如windows下面那么簡單&#xff0c;但是也不是很難。本文向大家講解了如何在Centos7下如何安裝mysql5.7版本,如果有什么問題和錯誤的地方&#xff0c;歡迎大家指出。 注釋&…

linux oracle刪除恢復數據恢復,Linux下Oracle誤刪除數據文件恢復操作

檢查數據文件的位置如下&#xff1a;SQL> select name from v$datafile;NAME--------------------------------------------------------------------------------/u01/app/Oracle/oradata/marven/system01.dbf/u01/app/oracle/oradata/marven/undotbs1.dbf/u01/app/oracle/…

數據庫如何處理數據庫太大_網絡數據庫中的數據處理

數據庫如何處理數據庫太大Before learning the data manipulation in a network model, we are discussing data manipulation language, so what is the data manipulation language? 在學習網絡模型中的數據操作之前&#xff0c;我們正在討論數據操作語言&#xff0c;那么什…

oracle12537錯誤,ORA-12537:TNS:connection closed錯誤處理方法

1.ORA-12537:TNS:connection closed錯誤處理過程檢查監聽正常&#xff0c;Oracle服務也是正常啟動的&#xff0c;但是登錄不進去。2.解決方案1. cd $ORACLE_HOME/bin/ 進入bin目錄2. ll oracle-rwxrwxrwx. 1 ora12 dba 323762222 6?. 14 19:12 oracle3.chmod 6571 oracle 更改…

操作系統中的死鎖_操作系統中的死鎖介紹

操作系統中的死鎖1.1究竟什么是僵局&#xff1f; (1.1 What exactly is a deadlock?) In a multiprogramming environment, there may be several processes with a finite number of resources. A process may request another resource while still holding some of the oth…

《云數據管理:挑戰與機遇》2.3 數據庫系統

本節書摘來自華章出版社《云數據管理》一書中的第2章&#xff0c;第3節&#xff0c;作者迪衛艾肯特阿格拉沃爾&#xff0c;更多章節內容可以訪問云棲社區“華章計算機”公眾號查看本節中&#xff0c;我們將為數據庫系統中的一些主要概念提供一個相當抽象、簡潔和高層次的描述。…

sql server與oracle的分頁,詳解SQLServer和Oracle的分頁查詢

不管是DRP中的分頁查詢代碼的實現還是面試題中看到的關于分頁查詢的考察&#xff0c;都給我一個提示&#xff1a;分頁查詢是重要的。當數據量大的時候是必須考慮的。之前一直沒有花時間停下來好好總結這里。現在又將Oracle視頻中關于分頁查詢的內容看了一遍&#xff0c;發現很容…

java treemap_Java TreeMap lastEntry()方法與示例

java treemapTreeMap類的lastEntry()方法 (TreeMap Class lastEntry() method) lastEntry() method is available in java.util package. lastEntry()方法在java.util包中可用。 lastEntry() method is used to return the entry (key-value pairs) that exists with the large…

LeetCode OJ 之 Valid Anagram

題目&#xff1a; Given two strings s and t, write a function to determine if t is an anagram of s. For example,s "anagram", t "nagaram", return true.s "rat", t "car", return false. Note: You may assume the string…

oracle光標位置無效,解決在Form表單中光標移動不了問題

apply p8727236_10123 for Developer Suite 10.1.2.3 in Linux首先到oracle的技術支持下載所需補丁,然后1先打補丁7121788&#xff0c;把p7121788_10123_LINUX.zip解壓到/home/oracledev目錄下(ORACLE_HOME為/u01/app/oracledev/OraHome_dev)$cd /home/oracledev/7121788$expo…

java treemap_Java TreeMap HigherKey()方法與示例

java treemapTreeMap類HigherKey()方法 (TreeMap Class higherKey() method) higherKey() method is available in java.util package. HigherKey()方法在java.util包中可用。 higherKey() method is used to return the lowest key value element higher than the given key e…

centos配置ipv6地址

首先打開網站注冊一個賬號&#xff1a;http://www.tunnelbroker.net創建一個ipv6的地址&#xff1a;把下面的命令在linux上執行一遍&#xff0c;這個方式是臨時生效&#xff0c;重啟網卡和重啟系統自動失效。把上面的命令保存到一個配置文件中&#xff1a;vi /etc/sysconfig/ne…

php oracle 需要libmysql.dll么_,Windows7環境下Apache+PHP+MySQL完美配置

寫作此篇文章的目的在于記錄Windows 7環境下成功配置WAMP環境, 初學者在不使用整合好的WAMPServer和XAMPP的情況下徒手配置整合環境貌似有很多意想不到的問題. 這將是我們需要討論的.我將重現幾個經典的問題, 并一一排除. 希望對各位看官有點借鑒作用.一. Apache在整合PHP后無法…

stringreader_Java StringReader skip()方法與示例

stringreaderStringReader類skip()方法 (StringReader Class skip() method) skip() method is available in java.io package. skip()方法在java.io包中可用。 skip() method is used to skip the given number of characters in the stream. skip()方法用于跳過流中給定數量的…

NFS部署及優化(一)

NFS部署及優化&#xff08;一&#xff09;一、NFS的基本概念NFS network file system 網絡文件系統必然通過網絡通信來實現文件的訪問和寫入&#xff0c;所以做這個實驗的話最好有兩臺虛擬機配置:A&#xff1a;一個192.169.50.201為server端B&#xff1a;一個192.169.50.200為…

oracle 11g跳過壞塊,oracle 使用Dbms_Repair跳過壞塊

原博文&#xff1a;http://blog.chinaunix.net/uid-77311-id-3051382.html使用Dbms_Repair跳過壞塊步驟1:表tb_test中有壞塊(模擬壞塊同方法1)SQL> select count(1) from hxl.tb_test;select count(1) from hxl.tb_test*ERROR at line 1:ORA-01578: ORACLE data block corru…

strictmath_Java StrictMath nextUp()方法與示例

strictmathStrictMath類nextUp()方法 (StrictMath Class nextUp() method) Syntax: 句法&#xff1a; public static float nextUp(float fl);public static double nextUp(double do);nextUp() method is available in java.lang package. nextUp()方法在java.lang包中可用。…

并發數據結構-1.1 并發的數據結構的設計

原文鏈接&#xff0c;譯文鏈接&#xff0c;譯者&#xff1a;董明鑫&#xff0c;校對&#xff1a;周可人 隨著多個處理器共享同一內存的機器在商業上的廣泛使用&#xff0c;并發編程的藝術也產生了巨大的變化。當前的趨勢向著低功耗芯片級多線程&#xff08;CMT&#xff09;發展…