Welcome, Guest. Please login or register.

Author Topic: Loooooong thought...Perfect algorithm for...  (Read 3183 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Loooooong thought...Perfect algorithm for...
« on: October 22, 2005, 03:14:10 PM »
@Jose

I don't really know what you are trying to accomplish here. I'm not clear on 2 things:

1) Are the functions executed as new processes
2) If so, why is this needed?

Certainly, if your functions take fixed arguments and run sequentially, a simple approach to storing a list of operations is to define a structure that contains a function pointer (to the code to be executed) and the rest of the structure comprises the arguments.

If they are the same layout you can just make an array of these.
int p; // A