#include <iostream>
#include <cstdlib>
#include <cassert>
using namespace std;
struct node
{
int info;
node *link;
};
void insert(node *first, node *here, int x)
{
node *temp = new node;
temp->info = x;
if (first == NULL)
{
first = temp;
}
else
{
here->link = temp;
}
}
i want to insert a node containing x to the node after the one pointed by 'here'. I cant seem to get it right though?