Search:

Type: Posts; User: rcgldr

Search: Search took 0.01 seconds.

  1. ptr[location] is a pointer to an integer,...

    ptr[location] is a pointer to an integer, *(ptr[location]) is the integer.

    The original if statement was comparing pointers, while the if statment I suggested changes this to compare the integers...
  2. Shouldn't the compare in printArray() be if(...

    Shouldn't the compare in printArray() be if( *(ptr[location]) > *(ptr[smallestIndex]) ) ... ?
Results 1 to 2 of 2