1. (2 Marks) The constructor of a class, Act, was declared as shown below. Briefly explain why there was a compilation error. class Act ( ... public: Act (const char t, int num, int len): r(num), f(len); };
Added by Mar-A N.
Close
Step 1
The constructor is declared with the name "Act". Show more…
Show all steps
Your feedback will help us improve your experience
Rakesh Singhi and 99 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
QUESTION 12 A constructor must have the same name as the class. a. name b. local variables c. number of parameters d. return type
Paul G.
What is the output should be? class Mycpp { int main() { Mycpp obj; return 0; } } Select one: a. Nothing would be printed b. Undefined c. Compilation Error. Constructor Missing d. In constructor e. In destructor
Hunza G.
Which pointer is implicit pointer passed as the first argument for non-static member functions?
Haricharan G.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
100,000+
Students learning Computer Science with Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD