Main.cc: In function ‘int main()’: Main.cc:8:10: error: ‘M’ was not declared in this scope cin>>n>>M; ^