The error is at the line 75 of the main.cpp . When i run the project, you can see that the method is succesfully called many time. But there is always one time it doesn't work. I tried to localize the segment fault and it's just when the method is called. You can access the AgentFondamental[i] attribute so it's not an invalid case of the vector. It print 1 before entering the method, but don't print a as it's asked line 46 of the file Agents.cpp.
I hope i respect the tos of the forum and thank you for your time.
(By the way i'm french so some of the variable are in french, sorry :/ )
So when i execute the project, i got a segment fault when i call the method demander_ordre. The problem is that it work for a few times but when it bug, it print 1 as it's asked line 2 of the sample. Here is the method :
When the segment fault occur, i don't get the "a" i asked to print line 2 of this sample. I thought it was the object i that wasn't in the range [0;AgentFondamental.size()[ but i can access the attribute of the object AgentFondamental[i] ...