how can i call a function which computes with input parameters from an another static function.
say,
class X
{
static void xyz();
static int pqr(int, int);
};
void X::xyz()
{
...pqr(10,20);
}
int X::pqr(int t1, int t2)
{
return t1*t2;
}
You have to call instance methods off an instance of the class. Otherwise, just call it off the class.
X::pqr(10, 20)
Your question is very vague, but it looks like you just need to do something like this:
void X::xyz()
{
int foo = X::pqr(10, 20);
}
int X::pqr(int t1, int t2)
{
return t1*t2;
}
X::xyz is already within the class context.
void X::xyz()instead ofX::void xyz()?