Main.cc: In function 'int main()': Main.cc:22:6: error: 'i' was not declared in this scope a[i] = (a[i]+3-'a')%26+'a'; ^ Main.cc:24:6: error: 'i' was not declared in this scope a[i] = (a[i]+3-'A')%26+'A'; ^