You probably could have asked this in the same question as your previous one.
If you make each node in the linked list a class, it will just work. Just be sure to use
new
to create each node and
delete
to delete them.
class A {
public:
A() {
m_pNext = NULL;
}
A(A *next) {
m_pNext = next;
}
~A() {
}
private:
A *m_pNext; };