Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is the purpose of adding int or void before the main () function?
What is the purpose of adding int or void before the main () function?
Hello, landlord!

If there is a data type before the function name (main stands for main function), such as int and float, it means that the function has a return value, and you need to use return to return the value of this type; If void is used, it means there is no return value.

You can ask again if you don't understand!