All submissions
#include <iostream>
using namespace std;

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

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

Input

Expected Output

Device created Device destroyed