### need help with special case, VERY CLOSE

"In this program we will write a small game using link list:

- Your program should ask the user to enter one alphabet letter at a time, and each letter should be stored in a node. Choose a terminate character if the user want to stop.

- Next, you will ask the user for an integer n as your count number.

- The game will go like this, starting from the first letter, you program will count and eliminate e very “nth” letter. For example, if n = 3; starting from the first letter, you will count 3 letter down the line and eliminate it. Then continue, if we reach the last letter we would continue counting from the beginning.

- Announce the last surviving letter.

An example flow of the program as follow, say if the user enter 6 letter and n = 3

ABCDEF - starting from A.

ABDEF - count 3 to C, C is eliminated. Continue from D.

ABDE - count 3 to F, F is eliminated. Continue from A. (since A is the next letter if you imagine this is a circular pattern).

ABE - count 3 to D, D is eliminated. Continue from E.

AE - count 3 to B, B is eliminated. Continue from E.

A - count 3 to E, E is eliminated. A is the last surviving letter"

Well, my program works as is intended, until there are 3 links left in the link list, or only one, at which point the program aborts. I believe I have tracked the program down to the line of code in my remove_node function "here = here->link;" When there is only one node in the link list, here->link = NULL, but I'm having trouble coming up with special case statement. I know that this error happens whenever the last link is the one that is to be removed.
Any help would be very much appreciated. This is my first post, so I'm trying to include all relevant information. Here is my code:

#include <iostream>
using namespace std;

struct Node
{
char letter;
};
typedef Node* NodePtr;

void insert(NodePtr& after, char some_letter);

void remove_node(NodePtr& here);

int num_nodes = 0;
int main()
{

char input_letter;
cout << "Enter the first letter in your link list: " << endl;

cout << "Enter the letters in your list. Enter 0 to stop:" << endl;
do
{
cin >> input_letter;
insert(after, input_letter);
num_nodes++;
}while(input_letter != '0');

remove_node(here);

while(num_nodes >= 1)
{
remove_node(here);
}
}

void insert(NodePtr& after, char some_letter)
{
if(some_letter != '0')
{
NodePtr temp = new Node;
temp->letter = some_letter;
after = temp;
}
}

void remove_node(NodePtr& here)
{
{
here = temp;
}
else
{
{
here = head;//Should point to B
}
else
{
here = temp;
}
num_nodes--;
}
}

{
}