What return type

They say there are no stupid questions when doing coding so here goes:
Can someone explain the following sentence to say a 12 year old
"One valid return type for main is ()"
What is the ()?
Is it the result of the function or what?

() stands for the void return type.

Thanks

It's an empty tuple, often called "unit", which is the canonical way to say "nothing" in Rust.

1 Like

Thank you!!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.