Skip to content

Commit

Permalink
Fixed unmatched types error on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
avighnac committed Jun 15, 2023
1 parent 290daee commit 98715a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/divide_with_steps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void divide_with_steps(const std::string &dividend_,
std::size_t subtraction_bar_len = divisor.length();
std::cout << std::string(space_to_leave - 3, '-') << " - "
<< std::string(
std::max(0UL, dividend.length() - things_to_subtract[0].length()),
std::max(0UL, (unsigned long)(dividend.length() - things_to_subtract[0].length())),
' ')
<< things_to_subtract[0] << "\n";

Expand All @@ -98,8 +98,8 @@ void divide_with_steps(const std::string &dividend_,

std::cout << std::string(space_to_leave, ' ') << carry_down_res[i] << "\n";
std::cout << std::string(space_to_leave - 3, ' ') << " - "
<< std::string(std::max(0UL, carry_down_res[i].length() -
things_to_subtract[i].length()),
<< std::string(std::max(0UL, (unsigned long)(carry_down_res[i].length() -
things_to_subtract[i].length())),
' ')
<< things_to_subtract[i] << "\n";
}
Expand Down

0 comments on commit 98715a4

Please sign in to comment.