Hey guys I can get this to compile, but the results should come back as 0 or 1 but if i try to output the results of c1 or c2, I get -44 or 8, which does not make sense. What might be wrong with this statement:
Code:for( int i=0; i<36; i++){ int c1=0; int c2=0; //compares user locations with the input file c1= strncmp(userLocA, b[index].getLocationOne(),strlen(userLocA)); c2 = strncmp(userLocB, b[index].getLocationTwo(),strlen(userLocB)); if(c1==0 && c2==0) break; }