When a parameter in a function definition (for say class distance) is abc(distance a) and in the main you call this function and pass distance b, what is the relationship thereafter between distance a and b? Do there adresses become equal-if so what implications does that have in the program?

Recommended Answers

All 2 Replies

Thanks RenjithVR , I now think I understand copy construcotrs better but just 1 more question: when you call abc(diatance b) to a (distance &c) function definition should you rather call abc(distance &b) to (distance &c)?

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.