Skip to content

Commit d8477a9

Browse files
author
Colin Robertson
committed
Clarify return in main
1 parent 98d488a commit d8477a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/cpp/program-termination.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int main()
4040
}
4141
```
4242

43-
The `exit` and **`return`** statements in the preceding example are functionally identical. However, C++ requires that functions that have return types other than **`void`** return a value. The **`return`** statement allows you to return a value from `main`.
43+
The `exit` and **`return`** statements in the preceding example are functionally identical. Normally, C++ requires that functions that have return types other than **`void`** return a value. The `main` function is an exception; it can end without a **`return`** statement. In that case, it returns an implementation-specific value to the invoking process. The **`return`** statement allows you to specify a return value from `main`.
4444

4545
## Destruction of static objects
4646

0 commit comments

Comments
 (0)