Hi all:
I have a function defined as:
inline double myFunction( const long int z ) const
{ return C->myFunction[ C->z[ z ] ]; }
and called in main() as:
for ( long int i = 0; i < 10; i++ )
{
for ( long int j = 0; j < 20; j++ )
{
node->myFunction( myMatrix(i,vector[j] ) );
}
}
I want to use a matrix as the argument, but I keep getting a segmentation fault when I try to run the program. I don't understand why. Can anyone help based on the information I have given? I can change the argument, but not the function.
Thanks a lot for any help!
Hi Steve, I meant that is not possible for me to modify the function at all (for example, to accept a matrix as an argument). But I can change the way the function is set up. I may not have defined this question well enough for you guys to help!
I have a function defined as:
inline double myFunction( const long int z ) const
{ return C->myFunction[ C->z[ z ] ]; }
and called in main() as:
for ( long int i = 0; i < 10; i++ )
{
for ( long int j = 0; j < 20; j++ )
{
node->myFunction( myMatrix(i,vector[j] ) );
}
}
I want to use a matrix as the argument, but I keep getting a segmentation fault when I try to run the program. I don't understand why. Can anyone help based on the information I have given? I can change the argument, but not the function.
Thanks a lot for any help!
Hi Steve, I meant that is not possible for me to modify the function at all (for example, to accept a matrix as an argument). But I can change the way the function is set up. I may not have defined this question well enough for you guys to help!