This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Virtual Function pointers

I would like to define something like a virtual function pointer that would be filled in at link time and then have routines call the function if it has been defined. I am using uvision3 IDE.
Anybody have any thoughts on this (other than to tell me to use C++, C# etc.)?

Parents
  • Yes: you need to be very sure that you fully understand all the implications and limitations of function pointers in C51 before you proceed with this!

    You will need to spend at least a day studying this application note: http://www.keil.com/appnotes/docs/apnt_129.asp

    And at least a further day searching the Keil site for "function pointer" and studying all the material that you find...

    Why do you particularly want to do this on an 8051?

Reply
  • Yes: you need to be very sure that you fully understand all the implications and limitations of function pointers in C51 before you proceed with this!

    You will need to spend at least a day studying this application note: http://www.keil.com/appnotes/docs/apnt_129.asp

    And at least a further day searching the Keil site for "function pointer" and studying all the material that you find...

    Why do you particularly want to do this on an 8051?

Children