Main.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include? #inlcude ^~~~~~~ include Main.cc: In function ‘int main()’: Main.cc:8:5: error: ‘scanf’ was not declared in this scope scanf("%d%d",&t,&m); ^~~~~ Main.cc:19:23: error: ‘max’ was not declared in this scope dp[j]=max(dp[j-w[i]]+val[i], dp[j]); ^~~ Main.cc:19:23: note: suggested alternative: ‘main’ dp[j]=max(dp[j-w[i]]+val[i], dp[j]); ^~~ main Main.cc:23:5: error: ‘printf’ was not declared in this scope printf("%d",dp[t]); ^~~~~~ Main.cc:23:5: note: suggested alternative: ‘int’ printf("%d",dp[t]); ^~~~~~ int Main.cc:7:13: warning: unused variable ‘res’ [-Wunused-variable] int t,m,res=-1; ^~~