概要
std::imaxdiv()関数の戻り値となる構造体型。
quotは「quotient (商)」、remは「remainder (剰余)」を表す。
なお、メンバの宣言順序は未規定である。
例
#include <iostream>
#include <cinttypes>
int main()
{
std::imaxdiv_t x = std::imaxdiv(17, 5);
std::cout << x.quot << std::endl;
std::cout << x.rem << std::endl;
}
出力
3
2
バージョン
言語
- C++11