Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int checkforDupe(struct FOO *ppt) {
int y, j;
char afoo[30], bfoo[30];
struct FOO *tmp, *ttmp;
for (tmp = ppt, y = 0 ; tmp != NULL ; tmp = tmp->nxt, y++) {
sprintf(afoo,"%p",tmp);
for (ttmp = tmp->nxt ; ttmp != NULL ; ttmp = ttmp->nxt) {
sprintf(bfoo,"%p",ttmp);
printf("Comparing addresses at %s :: %s\n", afoo, bfoo);
if ( (j = strcmp(afoo,bfoo)) == 0) {
return y;
}
}
}
return 0;
}
int checkforDupe(struct FOO *ppt) {
int y, j, x = 0;
char afoo[30], bfoo[30];
struct FOO *tmp, *ttmp;
for (tmp = ppt, y = 0 ; tmp != NULL ; tmp = tmp->nxt, y++) {
sprintf(afoo,"%p",tmp);
for (ttmp = ppt->nxt, x = y < 1 ? 0 : 1 ; ttmp != NULL ; ttmp = ttmp->nxt , x++) {
sprintf(bfoo,"%p",ttmp);
printf("Comparing addresses at OUT = %s :: IN = %s\n", afoo, bfoo);
printf("INNER: %d and OUTER: %d\n",x,y);
if (x != y && (j = strcmp(afoo,bfoo)) == 0) {
return y;
}
}
}
return 0;
}