Main.cc:3:11: error: ‘::main’ must return ‘int’ void main() ^ Main.cc: In function ‘int main()’: Main.cc:17:6: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a[i][j]); ~~~~~^~~~~~~~~~~~~~~