差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| fltk:example-app-bmi_calc [2025/05/27 18:04] – [プログラムのソースコード] Update main.cpp for zero division check freemikan | fltk:example-app-bmi_calc [2025/06/12 11:46] (現在) – [スクリーンショット] Remove imagebox freemikan | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== | + | ====== |
| - | {{: | + | [[fltk:|{{: |
| ===== スクリーンショット ===== | ===== スクリーンショット ===== | ||
| {{ : | {{ : | ||
| - | |||
| ===== プロジェクトレイアウト ===== | ===== プロジェクトレイアウト ===== | ||
| 行 64: | 行 63: | ||
| errno = 0; | errno = 0; | ||
| - | // NOTE: We also can use std::stod with std::string instead of std:: | + | // NOTE: We can also use std::stod with std::string instead of std:: |
| - | if (double value = std:: | + | if (double |
| *end_str == ' | *end_str == ' | ||
| return value; | return value; | ||
| 行 80: | 行 79: | ||
| double const h_m = *h_cm / 100; | double const h_m = *h_cm / 100; | ||
| - | // Make certain of avoiding | + | // Avoid zero divisions |
| if (double const h_m_2 = h_m * h_m; | if (double const h_m_2 = h_m * h_m; | ||
| h_m_2 > std:: | h_m_2 > std:: | ||
