// now "tagIndex" is the index for the matched tag: switch (tagIndex) { case 0: if (id->isMetricUnits) // strcpy (store, " C"); strcpy (store, " °C"); else // strcpy (store, " F"); strcpy (store, " °F"); break; case 1: strcpy (store, " %"); break; case 2: if (id->isMetricUnits) strcpy (store, " km/h"); else strcpy (store, " mph"); break; case 3: if (id->isMetricUnits) // strcpy (store, " mb"); strcpy (store, " hPa"); else strcpy (store, " in"); break;