This is main function comments
// 7% tax: 19*1.07 = 20.33
// 20% discount, 19% tax: (999*0.8)*1.19 = 951.05
And output format is followings.
std::ostream& operator<<( std::ostream& os, Money money )
{
return os << money.value;
}
So, I think output type is 'value' field type. Then 'value' field type is uint64_t.
|
return Money{ static_cast<uint64_t>( money.value * factor ) }; |
If main comments is collect, it should change uint64_t to double(or float).
This is main function comments
And output format is followings.
So, I think output type is 'value' field type. Then 'value' field type is uint64_t.
cpp_software_design/G35_Decorator_1.cpp
Line 23 in 1f2fe52
cpp_software_design/G35_Decorator_1.cpp
Line 30 in 1f2fe52
If main comments is collect, it should change uint64_t to double(or float).