Main.cc: In function ‘int main()’: Main.cc:22:14: error: ‘ma’ was not declared in this scope mx = max ( ma , dp [i] ) ; ^~ Main.cc:22:14: note: suggested alternative: ‘mx’ mx = max ( ma , dp [i] ) ; ^~ mx