I went to an interview last month the interviewer asked an interesting question: Can we write linked list using class not using structure? I said yes and also I wrote something like the code below. Can anyone explain whether it is right or wrong?
class list {
public:
int a;
class *list;
};