#include <iostream>
using namespace std;

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

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

Input

Expected Output

Device created Device destroyed