Hmmn, we'll need to know whether it is overflowing or underflowing the test, then. Try replacing

printf("constraint violated");

with this:

printf("\n\tconstraint violated: ");
if (fill_s[0] < fsi)
{
    printf("underflow, %d < %d\n", fill_s[0], fsi));
}
else if (fill_s[0] > fsf)
{ 
    printf("overflow, %d > %d\n", fill_s[0], fsf));
}
else
{
    printf("unknown error, program halting.\n");
    system("pause");
    exit(-1);   
}

That will at least tell you more about the problem.

ok..thanxx re..i am really grateful 2 u

You are welcome, I am glad that I was able to help. Were you able to get it working?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.