Main.cc:10:2: error: expected unqualified-id before 'return' return 1; ^ Main.cc:11:1: error: expected declaration before '}' token } ^ Main.cc: In function 'int prime(int)': Main.cc:9:2: warning: control reaches end of non-void function [-Wreturn-type] } ^