Re: debug error using struct
What does your call stack look like? What line in "PSO" is throwing the exception?
Viggy
Re: debug error using struct
The call stack looks like
Tribes1.exe!PSO(int level=0, float Max_Eval=40000.000) Line 490 C
The exception is thrown at the very first line in struct position PSO .
Re: debug error using struct
Could you post your whole struct ? yours doesn't look correctly-defined and that counts.
1 Attachment(s)
Re: debug error using struct
I have attached the struct code as an attachment
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);
Kindly help me.
swaroop
Re: debug error using struct
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.
Re: debug error using struct
Post your whole project - not just portions.
Include the DSW so that we can rebuild it just like you have done.
1 Attachment(s)
Re: debug error using struct
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