#include <iostream>
using namespace std;

class Device {
public:
    Device() {
        cout <<"Device created\n";
    }// your code here: define constructor printing "Device created"
    ~Device() {
        cout <<"Device destroyed\n";
        }// your code here: define destructor printing "Device destroyed"
};

int main() {
    Device d;
    return 0;
}
Upvote
Downvote
Loading...

Input

Expected Output

Device created Device destroyed