Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Pointers question (passing pointer to another function)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="A, post: 4069474"] Hi, I'd like to do something very simple but I'm not sure if I'm doing it right: I have 2 functions: //------------ void Function1(TObject *obj) { Function2(obj); } void Function2(TObject *obj) { obj->CallSomeObjFunction(); } //------------ So basically Function1 simply calls Function2 and passes pointer to use it in Function2. The above code compiles and works, but I'm not sure about the scopes of obj pointer and if it can be used like this? Is the above usage of pointer correct or should I use &obj instead? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Pointers question (passing pointer to another function)
Top