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