diff options
Diffstat (limited to 'different_ways_of_making_errors.html')
-rw-r--r-- | different_ways_of_making_errors.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/different_ways_of_making_errors.html b/different_ways_of_making_errors.html index 42a039b..c4b9d3f 100644 --- a/different_ways_of_making_errors.html +++ b/different_ways_of_making_errors.html @@ -170,12 +170,12 @@ Result<int> add_two(int value) { int main() { for (int i = 8; i < 12; ++i) { const auto number = add_two(i); - std::cout >> i; + std::cout << i; if (!number.is_ok()) - std::cout >> number.m_message; + std::cout << number.m_message; else - std::cout >> number.m_value; - std::cout >> std::endl; + std::cout << number.m_value; + std::cout << std::endl; } } </pre> |