← Back to Classes
Question 54
Copy Constructor Logs
Copy Constructor Logs
Create a class Logger with a copy constructor that prints "Copied". Add a constructor that accepts a string name and stores it. Do NOT write a main function.
Expected Output:
Copied Done
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Classes
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.