I\'m trying to compare a character array against a string like so:
const char *var1 = \" \"; var1 = getenv(\"myEnvVar\"); if(var1 == \"dev\") { // do stu
In this code you are not comparing string values, you are comparing pointer values. If you want to compare string values you need to use a string comparison function such as strcmp.
if ( 0 == strcmp(var1, "dev")) { .. }