impresión en cadena unida c ++
Estoy tratando de elegir mi cadena en el formato {1,2,3,4, etc}. Puede encontrar el archivo de encabezado debajo del cual tendrá el diseño de los nodos. Estoy confundido sobre cómo debo ir haciendo un ciclo a través de mi lista para imprimir el artículo.
Cualquier orientación sería muy apreciada!
set.h
using namespace std;
#include <iostream>
class Set
{
private:
struct Node
{
int Item; // User data item
Node * Succ; // Link to the node's successor
};
unsigned Num; // Current count of items in the set
Node * Head; // Link to the head of the chain
public:
// Return information about the set
//
bool is_empty() const { return Num == 0; }
unsigned size() const { return Num; }
// Initialize the set to empty
//
Set();
// Insert a specified item into the set, if possible
//
bool insert( int );
// Display the set
//
void display( ostream& ) const;
};