Just few quick question:

How often are pointers to functions used? Should i implement them in my programs?

Just few quick question:

How often are pointers to functions used? Should i implement them in my programs?

To be honest I have never had to use them up until now.
You should only implement something in your program if there's need to, it's not because you've the possibility to do something, that you actually have to do that "something" as well eh?

:P

commented: Thanks :D +1

How often are pointers to functions used?

As often as they're needed?

Should i implement them in my programs?

Function pointers work great for callbacks and generalized behavior at runtime. If you're doing something where they can be used and they're the best choice, you should use them. What you shouldn't do is look for places to use a random cool feature you just learned. That results in bad designs.

You should only implement something in your program if there's need to, it's not because you've the possibility to do something, that you actually have to do that "something" as well eh?

I know that, i was just wondering if they were a key feature of the language, something that should be taken advantage of. Thanks for your help :)

>i was just wondering if they were a key feature of the language
Yes, otherwise you now weren't talking about it. Edit:: It's at least a feature;

>something that should be taken advantage of
Look at Tom Gunn's post :)

Ok, thank you all :D

I'll mark this as solved :)

Ok, thank you all

Heh, according to your profile you hate the ":D" smiley:

P.S. I hate the ":D" smiley and prefer the ":)"

and now you're using it ?

:P

Heh, according to your profile you hate the ":D" smiley:

and now you're using it ?

:P

woops.....i need to pay more attention :o|

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.