There seem to be a lot of questions related to the pointer and the link, but I could not find what I want to know. Basically, an object is passed by reference:
funcA(MyObject &objRef) { ... }
Inside a function, can I get a pointer to this object instead of a link? If I treat the objRef reference as an alias of MyObject , can &objRef give me a pointer to a MyObject? This does not seem likely. I'm confused.
Edit: upon closer inspection, objRef returns me a pointer to the object I need. Most of you gave me the correct information / answer, thank you very much. I went for the answer that seems most indicative in this case.
c ++
Oliver Feb 13 '12 at 16:00 2012-02-13 16:00
source share