stack using double pointer

i am trying to create stack without STL or vector.so what is to create a new stack where each element in the stack consists of pointers to a string from user.

1
2
3
4
5
6
7
8
9
10
11
12
13

//get string from user.
//create space of string

char* str = new char [n.length()+1];


//get copy and this gives *str = 'H''E''L''L''O' 
strcpy (str,n.c_str);

//and then i create stack
char**stack = new char [num of str added]


the problem im having right now is how to get the pointer str to **stack .
what i want is stack[0] = "HELLO"...it read by each string not char..

any ideas of a good way of doing this?

thanks in advance.
Topic archived. No new replies allowed.