resolved one error and one segfault in xpp02

This commit is contained in:
lenovo
2022-12-12 22:34:11 +01:00
parent fecde1a8b1
commit 5b19461090
33 changed files with 567 additions and 326 deletions

View File

@@ -1,45 +1,54 @@
#ifndef ASPELL_HPP
# define ASPELL_HPP
#define ASPELL_HPP
# include <iostream>
# include <string>
#include <iostream>
#include <string>
class ATarget;
class ASpell {
private:
class ASpell
{
protected:
std::string name;
std::string effects;
public:
ASpell() {
};
ASpell(ASpell const & other) {
ASpell()
{}
ASpell(ASpell const & other)
{
*this = other;
};
ASpell & operator=(ASpell const & other) {
}
ASpell & operator=(ASpell const & other)
{
this->name = other.name;
this->effects = other.effects;
return (*this);
};
ASpell(std::string const & name, std::string const & effects) {
return *this;
}
ASpell(std::string const & name, std::string const & effects)
{
this->name = name;
this->effects = effects;
};
virtual ~ASpell() {
};
}
virtual ~ASpell()
{}
std::string const & getName() const {
return (this->name);
};
std::string const & getEffects() const {
return (this->effects);
};
void launch(ATarget const & atarget) const;
std::string const & getName() const
{
return this->name;
}
std::string const & getEffects() const
{
return this->effects;
}
void launch(ATarget const &) const;
virtual ASpell * clone() const = 0;
};
#include "ATarget.hpp"
#endif