A stupid question...probably
A stupid question then...
I was wondering, in C when you wanted to pass an argument in a function that would take the changes within the function and retain them (that is not a copy) you would pass a pointer to it.
In C++ there is this by reference thing where when you declare your function you declare the argument in discussion something like this void f(int&....) right? Then if you change that int in the function when you return to the main program it has also changed... (Personally i think it;s a lot easier than the pointers so I was wondering why the two was of refernce in C++ if someone can answer me in this as well...)
The stupid question. If I have a pointer to struct and I want to pass it in an argument I would probably do it like a pointer to pointer in C - which makes it more confusing - so can i pass it like this in C++ void f(node*&, ....)
Actually I tried it and I think it worked although I didnt check it out thoroughly cause I was doing something else and I lost that program. So now I am doing something else where I work with pointers and if this thing works it would help that having a function with an argument like this node*** (I have a pointer which I pass into a function and then on to another function)