Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 Suppose we have the following definitions: class Frabjous { private: char fab[20]; public: Frabjous(const char*s = C++) : fab(s) {} virtual void tell()

Question 1

Suppose we have the following definitions:

class Frabjous {

private:

char fab[20];

public:

Frabjous(const char*s = "C++") : fab(s) {}

virtual void tell() { cout<

};

class Gloam : private Frabjous{

private:

int glip;

pubic:

Gloam(int g=0, const char*s = "C++");

Gloam(int g, const Frabjous & f);

void tell();

};

Given that the Gloam version of tell() should display the values of glip and fab, provide definitions for the three Gloam methods.

Question 2

How is the static_cast operator different from the dynamic_cast operator?

Question 3

Which of the following are not examples of correct usage (conceptually or syntactically) of auto_ptr? (Assume the needed header files have been included.)

auto_ptr pia(new int[20]);

auto_ptr (new string);

int rigue = 7;

auto_ptrpr(&rigue);

auto_ptr dbl (new double);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions