Hello,
I am getting a segmentation fault in my program and do not know why. It occurs when the program reaches:
for(i=0; i < values.size();i++)
items[i].value += values[i];
Values have integers inside of it (7,77,2,3).
Items is a vector<knapSackStuff> items; and my knapSackStuff look like:
struct knapSackStuff
{
int value,weight;
};
Thanks in advance!