Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Objective C/C++ Pointers using . and -> ?
smcguffee Offline
Newbie
*

Posts: 1
Joined: Aug 2012
Post: #1
Objective C/C++ Pointers using . and -> ?
Hi,
I'm starting to get more comfortable using Objective C++ coming from a C/C++ background. I'm just realizing one of the things that has been confusing me, so I'm wondering if anyone can help me figure it out. Basically what I realized is that pointers in Objective C++ or Objective C can simultaneously use . and -> to access . to access Objective C++ properties, while simultaneously using -> to access C and C++ members, respectively. However, in C and C++, pointers need -> to access members. What is going on with this? What is the meaning of using a . on a pointer in Objective C++? Do I simply have to make pointers of objective C++ class pointers to get objects the way I think of them in C++?
Thanks in advance,
Sean
2012.08.12 04:37 PM
Find all posts by this user Quote this message in a reply
Derek Kuhl Offline
Super Moderator
******

Posts: 333
Joined: Jul 2005
Post: #2
RE: Objective C/C++ Pointers using . and -> ?
Objective-C++ is a bridging language. You'd only use it if you want to integrate C++ code. Dot notation was added to Objective-C 2.0, so naturally Objective-C++ 2.0 has to support them.
2012.08.13 08:28 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)