#include "def_struct.c"
int main()
{
float Max_Eval;
int level =0;
result=PSO(level, Max_Eval);
}
where pso is a structure
struct position PSO(int level, float Max_Eval)
{
int add_option=1;
int already;
.........
}
and struct position is defined in def_struct.c
struct position {struct vector p;struct f f;};
struct position PSO(int level, float Max_Eval);
When I debug the code,the program throws an exception while trying to call pso.Can anyone help me in this regard.
The function is declared before calling the function as
struct vector {double x[Max_DD];int size;};
struct f {double f[Max_f];int size;};
struct position {struct vector p;struct f f;};
struct position PSO(int level, float Max_Eval);
I think Mattrang was incorrect about struct definition, the implementation and and function declarations for the most part look really ill-formed, sorry I am currently under bad weather. Would you mind posting some other implementation parts of the work you are laying your hands on ? I think it wouldn't be a good idea for us to only guess where the mistake lies with such a little piece of information.
I have attached the whole project.The main file is main.c and the def_struct.c contains all the declarations.The text files functions.txt and problems.txt will feed the necessary parameters for running the program.
thanx n regards
swaroop
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.