|
-
September 10th, 2011, 09:09 AM
#1
Help with operator overloading!
Hey guys/girls,
I've got an assignment working with an encoder and a quadrature decoder/counter card - the thing I need a hand with is I'm required to overload the '!' operator such that when I write: '!MyEncoder', it resets all channels (there are 8).
I have a class with all required functions, such as ReadChannel(int channel) and ResetChannel(int channel), I'm just not exactly sure how I'd create the overload operator member function.
It doesn't need to return any value, it simply needs to perform a function (ie reset all channels) when '!MyEncoder' is input. I think that it requires an argument (int channel) which perhaps loops through all channels and resets them like that. I'm just confused as to how I would modify the functionality of '!'.
Any help/guidance is MUCH appreciated 
(ps. if you'd like to see what i've done so far, i can upload the source code no problem)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|