You are here:

C++/what does -> mean/do in programming?

Advertisement


Question
what does -> mean/do in programming?

Answer
When you want a member of a class of structure you use the . operator to reference the member:

If you want the member Call.number you use the . operator.  You have declared Call and you know that number is a member of call.  You have the value Call in this case.  If you only had the pointer to Call then you would not use the . operator, you would use the -> operator:

pCall = & Call ;
number = pCall->number ;

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Titus B. Ledbetter, Jr.

Expertise

C , MFC, Object Oriented, Artificial Intelligence

Experience

I have over ten years experience in the field of Computer Science, five years experience developing C/C++. I recently wrote a chess program using Object Oriented, C++, MFC.

Education/Credentials
Master's Degree Computer Science from Johns Hopkins

©2016 About.com. All rights reserved.