iOS Programming
Programming Stuff on iOS, Objective-C, Admob, Unity, Cocos2d-x
Saturday, May 9, 2015
Cocos2dx: Difference between ampersand and asterisk
Ampersand & is a reference. It cannot be modified.
eg:
bool
onContactBegin(
cocos2d
::
PhysicsContact
&contact);
Asterisk * is a pointer. It can be modified.
eg:
bool
onTouchBegan(
cocos2d
::
Touch
*touch,
cocos2d
::
Event
*event);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment