Skip to content

Commit

Permalink
Fixed syntax errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZCG-coder committed Mar 13, 2024
1 parent 04b287b commit 2ddab88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 5 additions & 2 deletions include/exceptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@
class ZeroDenominatorException : public std::runtime_error
{
public:
const char* what() const override;
}
const char* what() const override
{
return "The denominator is zero, which is not allowed.";
}
};
8 changes: 3 additions & 5 deletions src/fraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
* SOFTWARE. *
**************************************************************************************************/

#include "exceptions.hpp"
#include "fn/basicArithm.hpp"
#include "fraction.hpp"
#include "util.hpp"
#include <string>

const char* ZeroDenominatorException::what() const
{
return "The denominator is zero, which is not allowed.";
}

Fraction::Fraction()
{
this->top = "1";
Expand Down

0 comments on commit 2ddab88

Please sign in to comment.