I understand that you are allocating memory for Stack, buy do not understand after :: and I thought that you only used :: when declaring classes not in the classes.

myTop= new Stack::Node(original.top());

I can post the function class of the entire program if need be.

Recommended Answers

Stack::Node says Node is a structure defined inside class Stack.

Jump to Post

All 2 Replies

Stack::Node says Node is a structure defined inside class Stack.

Example:

class list{
public:
  class Node{
  };
};

list::Node n; //declare a Node object
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.