hey guys.. am learning c++
just started.. am not able to implement member dereferencing operators.. i know there basic definations and rules but...its like.. a clear picture is still not coming to my mind..as in how to make use of them.. please explain with examples..
nature_love 0 Newbie Poster
Recommended Answers
Jump to PostThere is no such concept as "dereferencing and operator". Operators are like <, >, <=, /, +, etc. You probably mean dereferencing a pointer.
int n = 123; int* p = &n; *p = 0; // dereferencing a pointer
Jump to PostHe perhaps, meant that he wants to customize the uranary * operator ( the dereferencing operator) for is custom class.
I don't know why would you like to do that but here is what I got:
Overload dereference operator like this:T& operator*() const //this will …
All 7 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
siddhant3s 1,429 Practically a Posting Shark
tux4life 2,072 Postaholic
siddhant3s 1,429 Practically a Posting Shark
ArkM 1,090 Postaholic
nature_love 0 Newbie Poster
ArkM 1,090 Postaholic
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.