C++ LLONG_MIN 宏常量
LLONG_MIN常量是climits頭中定義的宏常量,用於獲取long long int對象的最小值,返回long long int對象可以存儲的最小值,即-9223372036854775808(32位)編譯器)。
注意:
- 實際值取決於編譯器架構或庫實現。
- 我們也可以使用
<limits.h>
頭文件而不是<climits>
兩個庫中都定義了作為 LLONG_MIN 常量的頭文件。
LLONG_MIN 常量的語法:
LLONG_MIN
例:
Constant call:
cout << LLONG_MIN;
Output:
-9223372036854775808
用於演示帶有 climits 標頭的 LLONG_MIN 常量示例的 C++ 代碼
// C++ code to demonstrate example of
// LLONG_MIN constant with climits header
#include<iostream>
#include<climits>
using namespace std;
int main()
{
//prinitng the value of LLONG_MIN
cout<<"LLONG_MIN:"<<LLONG_MIN<<endl;
return 0;
}
輸出
LLONG_MIN:-9223372036854775808
用limits.h頭文件演示LLONG_MIN常量示例的C++代碼
// C++ code to demonstrate example of
// LLONG_MIN constant with <limits.h> header file
#include<iostream>
#include<limits.h>
using namespace std;
int main()
{
//prinitng the value of LLONG_MIN
cout<<"LLONG_MIN:"<<LLONG_MIN<<endl;
return 0;
}
輸出
LLONG_MIN:-9223372036854775808
相關用法
- C++ LLONG_MAX用法及代碼示例
- C++ List max_size()用法及代碼示例
- C++ List push_back()用法及代碼示例
- C++ List insert()用法及代碼示例
- C++ List empty()用法及代碼示例
- C++ List merge()用法及代碼示例
- C++ List reverse()用法及代碼示例
- C++ List splice()用法及代碼示例
- C++ LONG_MAX用法及代碼示例
- C++ List swap()用法及代碼示例
- C++ LONG_MIN用法及代碼示例
- C++ List unique()用法及代碼示例
- C++ List resize()用法及代碼示例
- C++ List assign()用法及代碼示例
- C++ List size()用法及代碼示例
- C++ List back()用法及代碼示例
- C++ List sort()用法及代碼示例
- C++ List emplace()用法及代碼示例
- C++ List pop_back()用法及代碼示例
- C++ List push_front()用法及代碼示例
注:本文由純淨天空篩選整理自 LLONG_MIN constant with example in C++。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。