Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 50807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:39:04+00:00 2026-05-10T16:39:04+00:00

I have a set of callback classes that I use for handling callbacks with

  • 0

I have a set of callback classes that I use for handling callbacks with variable numbers of parameters. Right now I have about 6 different instances of it to handle differing numbers of arguments. Is there a way to make one instance than can handle a variable number of arguments?? Ultimately I would love to have each parameter be a POD type or a class pointer, or a struct pointer. Any ideas?

template <class T> class kGUICallBackPtr { public:     kGUICallBackPtr() {m_obj=0;m_func=0;}     void Set(void *o,void (*f)(void *,T *));     inline void Call(T *i) {if(m_func) m_func(m_obj,i);}     inline bool IsValid(void) {return (m_func!=0);} private:     void *m_obj;     void (*m_func)(void *,T *); };   template <class T,class U> class kGUICallBackPtrPtr { public:     kGUICallBackPtrPtr() {m_obj=0;m_func=0;}     void Set(void *o,void (*f)(void *,T *,U *));     inline void Call(T *i, U *j) {if(m_func) m_func(m_obj,i,j);}     inline bool IsValid(void) {return (m_func!=0);} private:     void *m_obj;     void (*m_func)(void *,T *,U *j); }; 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:39:04+00:00Added an answer on May 10, 2026 at 4:39 pm

    Not yet in the language itself but C++0x will have support for variadic templates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two classes that don't know anything about themselfs class A, class B.
I have been assigned a project to develop a set of classes that act
I have set an environment variable in windows by name sample. Can I get
I have set up transactional replication between two SQL Servers on different ends of
I have a receive callback from an async client method that is supposed to
Set Success page redirection in google checkout ? i have already set callback URL
I use jQuery 1.2.6 (legacy). In my general configuration I have set these options:
I have decided that I wanted to create some custom dialog classes that could
I have a couple of classes that want to pass each other some information
I have two classes, ClassA that will instantiate ClassB and pass off a method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.