When to use pointers and when to use references in c++. plz clear my doubt.. thnks in advance
dasari.prasad
0
Newbie Poster
Recommended Answers
Jump to Posthttp://www.cplusplus.com/doc/tutorial/pointers/
http://www.cplusplus.com/articles/EliteHussar1/
Hopefully these articles might help
Jump to PostPointers and references are similar and are both used under similar circumstances. Really, a reference is just a pointer without all the extra syntax, but they are not freely interchangable. Which syntax you use for function calls depends on how the function being called is defined. Both are frequently used …
Jump to PostDirectly comparing custom data structures requires operator overloading, as far as I know C can't overload operators.
To do it in C, you would have to write a custom function that has 2 structures passed in as arguments. You would then perform the comparisons and return the appropriate result. …
All 10 Replies
elsiekins
0
Junior Poster
jakesee
0
Junior Poster
Fbody
commented:
Just showing off, doesn't help the OPs question.
+0
Fbody
682
Posting Maven
Featured Poster
Ancient Dragon
commented:
nice info :)
+33
dasari.prasad
0
Newbie Poster
Fbody
682
Posting Maven
Featured Poster
dasari.prasad
0
Newbie Poster
Fbody
682
Posting Maven
Featured Poster
dasari.prasad
0
Newbie Poster
mrnutty
761
Senior Poster
ben1Greer
0
Newbie 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.