It is better to define variables i, j as local variables of the loops. Also it is not clear why variables tempZip and tempShip were declared when they are not used in the code of the function. Moreover after the control statement of the first loop you placed a semicolon. It is obviously a bug.
Taking into account all what was said the code could look the following way
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
for ( int i = 0; i < numEntries-1; i++ )
int min = i;
for ( int j = i+1; j < numEntries; j++ )
if ( codes[j] <codes [min] ) min = j;
if ( min != i )
swap( codes[i], codes[min] );
swap( ship[i], ship[min] );
class std::string has the copy assignment operator. So you may assign one object of type std::string to other object of the same type.
If you do not use standard function std::swap then the code I showed above could look the following way