eror program c++ pointer with struct

help pliss,,

i have a problem,,

I'm in charge of making a project struct with pointer;

like this,,

struct whatever{

int next;

int previous;

int value = 5;

}test;

so if the user input:

1 1

display 5,

if user input :

2 1 3,

2 3 7,

test.value = 3,5,7

if user input :

next; test.next 3,

next

test.next 5,

next

test.next 7,

previous;

test.previous 5,

previous:

test.previous 3

if user input :

3 2;

test.value = 3,7;

5 is erase..

but this program just use pointer and struct, help pls