mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-06 17:13:59 -05:00
Moved Unsolved to it's own file
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include "Stopwatch.hpp"
|
||||
#include "Unsolved.hpp"
|
||||
|
||||
|
||||
class Problem{
|
||||
@@ -34,7 +35,6 @@ protected:
|
||||
const std::string description; //Holds the description of the problem
|
||||
mee::Stopwatch timer; //Used to determine your algorithm's run time
|
||||
bool solved; //Holds true after the problem has been solved
|
||||
class Unsolved{}; //An exception class thrown if you try to access something before it has been solved
|
||||
public:
|
||||
//Constructors
|
||||
Problem() : solved(false){
|
||||
|
||||
24
Headers/Unsolved.hpp
Normal file
24
Headers/Unsolved.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
//ProjectEuler/ProjectEulerCPP/headers/Unsolved.hpp
|
||||
//Matthew Ellison
|
||||
// Created: 08-28-20
|
||||
//Modified: 08-28-20
|
||||
//An exception class thrown if you try to access something before it has been solved
|
||||
|
||||
|
||||
#ifndef UNSOLVED_HPP
|
||||
#define UNSOLVED_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
class Unsolved{
|
||||
private:
|
||||
std::string message;
|
||||
public:
|
||||
Unsolved(){}
|
||||
Unsolved(std::string message) : message(message){}
|
||||
};
|
||||
|
||||
|
||||
#endif //UNSOLVED_HPP
|
||||
Reference in New Issue
Block a user