Thread
:
Team 67 C++ Example Code
View Single Post
#
3
29-10-2008, 11:26
AustinSchuh
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 800
Re: Team 67 C++ Example Code
-> and . can not be interchanged.
x->y() is a shortcut for (*x).y(), so you use . when x is an object, and -> when x is an pointer to an object. It is exactly the same as accessing members of a structure in C.
AustinSchuh
View Public Profile
Find all posts by AustinSchuh
Find CD-Media Photos by AustinSchuh
Find CD-Media Papers by AustinSchuh