Sometimes it just takes another's unbiased eyes to see a problem in code:
The arrays are set up as: "int gintCasePart[30];" and "gstrCasePa rt[19,40];"
Here are two code snipets I added to the previously working code (hint: it works on Windows, but not Linux):
and (and I know some of the below is redundant, but it works on the windows side, just not the Linux side...
I also added a debug print statement to attempt to see what was going on in my arrays:
I appreicate any help you can offer, I've been staring at this for nearly 12 hours, and can find no solutions...I'm sure I've just been looking at it too long, without getting a fresh perspective....
Thanks,
Sitko.
The arrays are set up as: "int gintCasePart[30];" and "gstrCasePa rt[19,40];"
Here are two code snipets I added to the previously working code (hint: it works on Windows, but not Linux):
Code:
...
gintCasePart[0] = 1;
gintCasePart[1] = 2;
gintCasePart[2] = 3;
gintCasePart[3] = 4;
gintCasePart[4] = 5;
gintCasePart[5] = 6;
if (gblnAngledFlaps == 1)
{
gintCasePart[6] = 7;
gintCasePart[7] = 8;
gintCasePart[8] = 9;
if (gblnInsertX == 1)
{
gintCasePart[9] = 10;
}
}
else
{
gintCasePart[6] = 9;
if (gblnInsertX == 1)
{
gintCasePart[7] = 10;
}
}
Code:
if (gblnAngledFlaps==0)
{
strcpy(gstrCasePart[6],"Cover");
gintCasePart[6]=9;
gintPartsCount = 7;
if (gblnInsertX==1)
{
strcpy(gstrCasePart[7],"Insert");
gintCasePart[7]=10;
gintPartsCount = gintPartsCount + 1;
}
}
else
{
strcpy(gstrCasePart[6],"Inside, Angled Flaps +X+Y, -X-Y");
gintCasePart[6]=7;
strcpy(gstrCasePart[7],"Inside, Angled Flaps +X-Y, -X+Y");
gintCasePart[6]=8;
strcpy(gstrCasePart[8],"Cover");
gintCasePart[6]=9;
gintPartsCount = 9;
if (gblnInsertX==1)
{
strcpy(gstrCasePart[9],"Insert");
gintCasePart[6]=10;
gintPartsCount = gintPartsCount + 1;
}
}
Code:
void check_array(char * func, char * area)
{
int x;
x = 0;
printf("In function: %s, In Area: %s",func,area);
for (x=0;x<=11;x++)
{
printf("intCasePart = %d, gstrCasePart = %s",gintCasePart[x],gstrCasePart[x]);
}
}
Thanks,
Sitko.
Comment