Premetto che l'ho buttata giù senza pensarci troppo quindi fai attenzioni ad eventuali errori:

Codice PHP:
#include <iostream>
#include <ctime>
#include <cstdlib>

using namespace std;

struct node
{
    
int data;
    
nodenext;
};

nodehead NULL;

void print(nodestart)
{
    
nodeiter start;
    
    while(
iter != NULL)
    {
        
cout << iter->data << " | ";
        
iter iter->next;
    }
    
    
cout << endl;
}

void findMax(nodenint** max)
{
    if(
== NULL)    
        return;    

    if(*
max == NULL)    
        *
max = new int(n->data);    
    else if( 
n->data > **max)    
        **
max n->data;                
        
    
findMax(n->nextmax);
}

void f(int** n)
{
    *
= new int(10);    
}

int main(int argcchar *argv[])
{

    
srand( (unsigned)time(0) );
        
    for(
int i 010i++)
    {
        
nodenewNode = new node;
        
newNode->data = (rand() % 10) + 1;
        
newNode->next head;
        
head newNode;
    }        
        
    print(
head);
    
    
intmax NULL;        
    
findMax(head, &max);
    
cout << endl << "Max: " << *max;    
    
    
    
//******* VERIFICA **********
    
nodeiter head;
    
bool ok true;
    while(
iter != NULL)
    {
        if(*
max head->data)
        {
            
ok false;
            break;
        }
        
        
iter iter->next;
    }
    
    if(
ok)
        
cout << " - OK" << endl << endl;
    else
        
cout << " - NO" << endl << endl;
    
//*******************************
        
    
delete max;