Here is my code to make it better to understand (Hopefully)

Code:
```node *newnode = current;
node *temp = current;
node *start = current;
int number = 0;
int num = 0;
for (int i = 1; i < length; i++) // this function is just ensuring the node before the deleted node points to 2 nodes in front
{
}

if (newnode -> num == x)
{
number = current -> longlink -> num; // here as you can see i want to store the longlink value of the deleted node into the variable number
delete newnode;
length--;
}

else

while (newnode -> shortlink -> num != start -> num)
{
if (newnode -> shortlink -> num == x)
{
number = temp -> longlink -> num; // here as you can see i want to store the longlink value of the deleted node into the variable number
delete temp;
length--;
}
}

if (newnode -> shortlink -> shortlink -> num == length && newnode -> shortlink -> num == x)
{
length--;
}

for (int z = 1; z < length; z++) // this function goes through each node to see if any of the long links are pointing to the deleted node
{
// if i put a cout statement exactly here to cout number - it recognises the number variable fine
if (longlinker -> longlink -> num == x) // if i've found it // once it looks into this if statement - number isn't recognised - why?
{
longlinker -> longlink -> num = number; // then i want to update the longlink of this which stores number
}
else
{