![]() |
Some problems with structure and array . . .
Hi all,
i am having some problem with this part of the program and i don't know what is wrong if you could please check it out . . . Code:
int main()Thanks for your time and help, Best regards, BoSCHoW. |
Re: Some problems with structure and array . . .
See another of today's posts regarding programs closing in some manner that seems premature to you. It is not strange. It is appropriate behavior. The deficiency is not in the program, but in your inappropriate thought.
|
Re: Some problems with structure and array . . .
I sense that you have not allocated some memory for which you have a crash in the program and for us to check the program we probably need the structure as well.
|
Re: Some problems with structure and array . . .
Well the whole code is here, so please check it out. Further more i will search on the forum and will try to find the answer for this error.
Code:
#include <iostream>BoSCHoW. |
Re: Some problems with structure and array . . .
I solved the problem but a new question is running through my mind lets say if i want to have lets say 5 PID regulators all i have to do is add a few arrays to the variables in the struct . . . and this should look something like this ?
Code:
of all the variables parameters and internal variables used for calculation ... the code should look something like this : Code:
typedef struct {regWith.pidReg[0].vary *pid_vary. So if i would use 5 pids i would call the same function with the same structures the array number would varray . . . see the code for more explanations.... Code:
float PID(regWith.pidReg[0].param *pid_param, regWith.pidReg[0].vary *pid_vary)Thanks for Your help, Best Regards, BoSChoW. |
| All times are GMT +5.5. The time now is 04:22. |