cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
What does "->" do?
What does "->" do?
Jul 20, 2013 at 6:57pm UTC
CPlahPlahLearner
(53)
So lately, I've bumped into codes which have used the "->" statement/operator a lot. Can anyone tell me what does that do? (I can't google it since google ignores such symbols).
Thanks in advance.
Jul 20, 2013 at 7:18pm UTC
Peter87
(11234)
If
p
is a pointer then
p->q
is just a shorter way of writing
(*p).q
.
Jul 20, 2013 at 7:50pm UTC
closed account (
Dy7SLyTq
)
pointer to an object that is
Jul 20, 2013 at 7:59pm UTC
cire
(8284)
pointer to an object that is
Untrue. Whether or not pointer
p
points to an object, some random place in memory or holds the value
nullptr
, the meaning of
p->q
does not change.
Topic archived. No new replies allowed.