I'm starting the ADS course and my programming teacher insists on using return 0
at the end of the function. Most use Windows, I realized that return
0 is required in Windows but in Ubuntu (which is what I use) I do not put return
0 but anyway the program runs normally without any errors.
My question is, why does return 0
become necessary in Windows but not in Linux? Does it have something to do with the compiler? I used both g++
and gcc
on the terminal.