Re: I can't understand this "const*&" stands for?

From: Jonathan Mcdougall (jonathanmcdougall_at_DELyahoo.ca)
Date: 10/06/03


Date: Mon, 6 Oct 2003 14:32:29 -0400


> void push_front(Node const*& head, int data);
>
>
> Can someone tell me what it means for "const*&"? A reference or a pointer?

A const reference to a pointer. The function probably reset your pointer
to 0, meaning it takes ownership of the object, though the name 'head' makes
me wonder about that.

Jonathan



Relevant Pages

  • Re: Photons
    ... That does not mean that it is now without meaning. ... The modern definition of time is that it takes light the same "time" to ... head start -- a pointer, ...
    (sci.physics.relativity)
  • Re: Still more linked list magic :-)
    ... if pointer deallocation succeeded ... TYPE(my_pointer), POINTER:: current! ... Check if the head of the list is allocated, ... print *, 'before calling dealloc_list:' ...
    (comp.lang.fortran)
  • Still more linked list magic :-)
    ... if pointer deallocation succeeded ... TYPE(my_pointer), POINTER:: current! ... Check if the head of the list is allocated, ... print *, 'before calling dealloc_list:' ...
    (comp.lang.fortran)
  • [RFC][PATCH] Improve readability by hiding read_barrier_depends() calls
    ... it is sometimes difficult to figure out which pointer is ... extern void rcu_check_callbacks(int cpu, int user); ... #define list_for_each_safe_rcu(pos, n, head) \ ... * Double linked lists with a single pointer list head. ...
    (Linux-Kernel)
  • Re: Skybucks Warrior: CleanTheHouseV2
    ... org head ... contains the pointer for clearing so when it overwrites the pointer ... trail of processes that makes your warrior stronger. ... Location 'gate' is incremented continuously, ...
    (rec.games.corewar)