Error with a structure expression must have class type/pointertype

I found out where the mistake was.
I used the wrong type.

Sorry for the disturbance

Hi,
Just a suggestion: you could declare “tableauObjet” as “knapSack *” rather than “int *”.

thanks you. that was my mistake :)