hhey sir i need some information about his topic urgently
sarvari
0
Newbie Poster
Recommended Answers
Jump to Postwhat do you want to know about it? c++ objects are normally passed by reference to avoid expensive duplication and to let other functions use the same object as the calling function.
class MyClass { // blabla }; void foo(MyClass& obj) { // class passed by reference …
Jump to PostThey can also be passed as pointers, if you want to use them. Thought I believe it's considered better to use references over pointers when possible.
class MyClass { // blabla }; void foo(MyClass* obj) { // class passed by reference } int main() { MyClass myclass; …
All 8 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
CoolGamer48
65
Posting Pro in Training
sastry.soft
0
Newbie Poster
sastry.soft
0
Newbie Poster
sastry.soft
0
Newbie Poster
sastry.soft
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
L7Sqr
227
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.