Change main() to int main(void)
system("pause"); will only work on Windows/MS-DOS or other systems where there is a system program called pause (Don't use it)
There is no return value from main,...