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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.