Hi,
i've got a problem. i want to implement a class called element, which has a pointer called ele, like this:
class element {
int i_a;
element* p_ele;
}
but if i write: element p_new = new element; the pointer p_ele won't point to NULL but to a location, where i_a is initialized whith 0. can sombody explain that to me? i want to have a null pointer if i create a new element...
thanx
i've got a problem. i want to implement a class called element, which has a pointer called ele, like this:
class element {
int i_a;
element* p_ele;
}
but if i write: element p_new = new element; the pointer p_ele won't point to NULL but to a location, where i_a is initialized whith 0. can sombody explain that to me? i want to have a null pointer if i create a new element...
thanx