Ask Question
8 October, 06:41

Using C++, Write a full class definition for a class named Acc1, containing no constructors, functions, or data members (i. e., a totally empty class). (Note, the last character of the classname is "one" not "ell".)

+3
Answers (1)
  1. 8 October, 08:31
    0
    Hi!

    Okay, so -

    To make a C + + class, we have to use the keyword class followed by the class name, and a pair of curly braces which will be our class body.

    Our class body is what holds all of our constructors, functions, and data members.

    So, to write a completely empty class - we would just have to simply write:

    class Acc1

    {

    };

    Note -

    All classes must end with a semi colon! This is just a standard rule we follow since it was how C + + has been defined. If you were to leave the semi colon out, you would get a compiler error! = )
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Using C++, Write a full class definition for a class named Acc1, containing no constructors, functions, or data members (i. e., a totally ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers