Boa tarde pessoal eu estou tentando criar uma lista em C++, com as funcoes de inserir e printar. Consigo inserir os elementos, porem na hora de printar nao aparece nada. Estou usando o DevC++ 5.11. Agradeço desde ja.
main.cpp
#include 
#include “SNode.h”
#include “SList.h”
using std::cout;
using std::cin;
using std::endl;
int main(int argc, char** argv) {
SList lista;
	
for(int i = 0; i < 5;i++){
	lista.push_front(i);
}
lista.print();
return 0;
}
SNode.h
struct SNode{
int value;
SNode *next;
SNode(int value = 0){
	this->value = value;
	this->next = NULL;
} 
};
SList
#include
struct SList{
SNode *head;
SList(){
	head = new SNode;
}
	
void push_front(int value){
	
	SNode *node = new SNode(value); 
	node->next = head->next; // ***
	head->next = node;
	
}
void print(){
	
	SNode *node = head->next;
	
	while(node != NULL){
		
	std::cout << node->value << " ";
	node = node->next;	
	
	}
		
}
int size(){
	
	SNode *node = head->next;
	int count = 0;
	while(node!=NULL){
	count++;
	node = node->next;	
	}
	return count;
	
}
};