Hi all,
Do u have any idea that whether I can pass any function as a parameter to another function?
like:
#include<iostream>
#include<fstream>
#include<vector>
using namespace std;
int i=5,j=8;
int add()
{
int c=i+j;
return c;
}
int sub()
{
int c=j-i;
return c;
}
int try(int *add)
{
if(add()>10)
try(sub);
}
int main()
{
cout<<try;
}
What do you think is this correct (it gave lots of compiling error)...If not is there any other method to do such thing?:-/