hey guys, i need to pass 'this' as the template function parameter..
any help will be appreciated.
low_coder
26
Junior Poster in Training
Recommended Answers
Jump to Posthey guys, i need to pass 'this' as the template function parameter..
any help will be appreciated.Where is the function?
Jump to PostYou'll have to explain this better, and provide some code. What you are talking about is generally not advisable.
If you've designed your system correctly, you really shouldn't have to pass "this" to something. I think you need to take a closer look at your design.
Jump to Post:confused: Why on earth would you do that? That's a lot of screwing around to just return a value you already have access to:confused:
class a { public: a() { num = 0; }; ~a() { }; /* original code... int func() { return getnum(this); } template …
All 9 Replies
group256
-3
Junior Poster
Stefano Mtangoo
455
Senior Poster
Fbody
682
Posting Maven
Featured Poster
Ancient Dragon
commented:
good advice
+34
Stefano Mtangoo
commented:
Well said!
+6
low_coder
26
Junior Poster in Training
Fbody
682
Posting Maven
Featured Poster
low_coder
26
Junior Poster in Training
Fbody
682
Posting Maven
Featured Poster
mrnutty
761
Senior Poster
low_coder
26
Junior Poster in Training
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.