Main.cc: In function 'int main()': Main.cc:10:9: error: redeclaration of 'int d' int d = max(x, y); ^ Main.cc:6:18: note: 'int d' previously declared here int a, b, c, d; ^