cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Reference to pointer to constant object
Reference to pointer to constant object
Jan 3, 2013 at 11:16am UTC
Bobruisk
(18)
Hello!
As the title suggests, how do I declare a reference to a pointer to a const object?
That is, the pointer points at a constant object. I want to get the reference to this pointer.
Thanks!
//Bobruisk
Last edited on
Jan 3, 2013 at 11:17am UTC
Jan 3, 2013 at 12:37pm UTC
vlad from moscow
(6539)
1
2
3
const
int
i = 10;
const
int
*cp = &i;
const
int
* &rcp = cp;
Jan 3, 2013 at 2:26pm UTC
Bobruisk
(18)
Thank you, Vlad. :)
Topic archived. No new replies allowed.