Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I don't know how to fix my code. I am getting error messages. I have provided pictures below; This is my cpp file This is
I don't know how to fix my code.
Ififief DINOSAUR_HPP "define DINOSAUR_HPP *include "Dinosaur. hpp" Hiaclude Dinosaur: Dinosaur(int a, int b):x(a),y(b), alive(true) } 2.01. Dinosaur: : operatedsa (const pinosaur \& other)f \} Let:yrn x>; (2) out-of-line definition of 'operators' does not match any declaration in 'Dinosaur' std:istring Dinosauri:igetNane().sonst f 3 return name: std: string. Dinosauri:getAttack()..const. \{ \} raturn attack: char Dinosaur: igetioken() const \{ 3 return token; bool Dinosaur::isAlive() const \{ return alive; 3 " pinclude 4ifndef HOMEWORK_01_STRANGER_THINGS_DINOSAUR_HPP_ IIdefine HOMEWORK_01_STRANGER_THINGS_DINOSAUR_HPP_ public vi candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided \} 3; virtual Dinosaur(); class Tyrannosaurus : public pinosaun \{ public: Tyrannosaurus ().i. Dinosaur (0,0){x virtual void roar() const f \} std:: cout "Roar! who is Dinosaur, I am the King!" std::endl; vir tual Tyrannosaurus(); class Stegosaurus : public pinosaur \{ public: Stegosaurus () : Dinosaur (0,6){} virtuat void roar( ) const std: : cout "Roar! I am the protector" std: :endl; fndef HOMEWORK_01_STRANGER_THINGS_DINOSAUR_HPP_ \#define HOMEWORK_O1_STRANGER_THINGS_DINOSAUR_HPP_ solminininasaur public: virtual void roar() const \{ \} std: : cout "Roar!!!! I am the King" std:;endl; virtual Dinosaur(); 3; class Tyrannosaurus : public Dinosaur \{ public: Tyebenosaurus() : Dinosaur (0,0){} (2) no matching constructor for initialization of 'Dinosaur' m the King!" std: :endl; virtual Tyrannosaurus(); class Stegosaurus : public Dinosaur \{ public: Stegosaurus () : Dinosaur (0,6){} virtual void roar() const } std:: cout "Roar! I am the protector" std::endl I am getting error messages.
I have provided pictures below;
This is my cpp file
This is my hpp file
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started