Overriding a method in C

This is a discussion on Overriding a method in C within the C Programming forums, part of the General Programming Boards category; Hi everyone Is there any way to override a method in c? I am using a blackbox framework when developing ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    58

    Overriding a method in C

    Hi everyone

    Is there any way to override a method in c? I am using a blackbox framework when developing some code and need to alter the way a specific method works. I donít have access to the method directly (as in source) and was wondering if there was a way I could re-define the method elsewhere in my program and use my own code inside? (In effect binning the old method so I can write a better one )

    Cheers

    David

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    C doesn't have "methods". It has functions. Once a function is written, it's written and that is that.

    There are non-portable ways of doing this kind of thing, however, they are advanced, and you don't strike me as a person that has a good reason to do this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. on method pointers and inheritance
    By BrownB in forum C++ Programming
    Replies: 2
    Last Post: 03-02-2009, 06:50 PM
  2. stuck on display method
    By shintaro in forum C++ Programming
    Replies: 2
    Last Post: 02-01-2009, 04:17 PM
  3. Best communication method to thousand childs?
    By Ironic in forum C Programming
    Replies: 8
    Last Post: 11-07-2008, 11:30 PM
  4. C# method
    By siten0308 in forum C# Programming
    Replies: 6
    Last Post: 07-15-2008, 07:01 AM
  5. Replies: 2
    Last Post: 01-22-2008, 03:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21