The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
need to return value from function darshakraut Shell Programming and Scripting 5 05-14-2008 05:13 AM
function return array dophine Shell Programming and Scripting 6 05-06-2008 09:16 AM
Function call not return value into var katzs500 UNIX for Dummies Questions & Answers 1 04-18-2008 06:31 PM
return value of a function prez Shell Programming and Scripting 3 08-22-2007 02:08 PM
Problem with function which reutrns pointer to a value jazz High Level Programming 5 10-28-2005 07:03 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-22-2008
Registered User
 

Join Date: Aug 2005
Posts: 229
How to return void function pointer

Hello all
im trying to build function that will return void function pointer
what is mean is ( not working )
the main function
PHP Code:
void myClass::getFunction(int type){
    if(
type==1)
        return &
myClass::Test1;
    if(
type==2)
        return &
myClass::Test2;
}

void myClass::Test1(){
    
printf("nada1");
}

void myClass::Test2(){
    
printf("nada2");

what im doing wrong here ?
Reply With Quote
Forum Sponsor
  #2  
Old 03-22-2008
Registered User
 

Join Date: Dec 2007
Location: Virginia, USA.
Posts: 250
The Function Pointer Tutorials - Syntax
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0