I am trying to use a class member function in another member function from the same class. Only thing is both class member functions(Class Foo) use arguments which are some parameters which come from some other class(Class Params) which has only data members. I am passing these parameters as constant pointer to both the member functions. When I trying compiling it with all the necessary files I get an error as 'expected expression'. Since the actual code is long and in separate files, I'm just showing how the class implementation file looks like. Any help will be appreciated!
Params::Params(){ // all data members are declared in the
double param1; // constructor of Class Params.
double param2;
double param3;
...
...
double paramN; // n-th parameter
}
double Foo::Foo1(const Params & p){
// function body
}
double Foo::Foo2(const Params & p){
result = p.paramN * Foo1(const Params & p); // this line is problematic, it is
// showing the above error in the
// argument of function Foo1.
return result;
}