Skip to content

Commit b240748

Browse files
authored
Update main functions with omitted int return type
1 parent c423635 commit b240748

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

docs/error-messages/compiler-errors-1/compiler-error-c2086.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The following sample generates C2086:
1818

1919
```cpp
2020
// C2086.cpp
21-
main() {
21+
int main() {
2222
int a;
2323
int a; // C2086 not an error in ANSI C
2424
}

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4744.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The following sample generates C4744.
3737

3838
extern unsigned global;
3939

40-
main()
40+
int main()
4141
{
4242
printf_s("%d\n", global);
4343
}

docs/error-messages/tool-errors/math-error-m6111.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ A floating-point operation resulted in a stack underflow on the 8087/287/387 cop
1414

1515
This error is often caused by a call to a **`long double`** function that does not return a value. For example, the following generates this error when compiled and run:
1616

17-
```
17+
```c
1818
long double ld() {};
19-
main ()
19+
int main ()
2020
{
2121
ld();
2222
}

docs/intrinsics/debugbreak.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ The `__debugbreak` compiler intrinsic, similar to [DebugBreak](/windows/win32/ap
3434
For example:
3535

3636
```C
37-
main() {
37+
int main() {
3838
__debugbreak();
3939
}
4040
```
4141

4242
is similar to:
4343

4444
```C
45-
main() {
45+
int main() {
4646
__asm {
4747
int 3
4848
}

docs/parallel/openmp/a-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ The following example demonstrates the [num_threads](2-directives.md#23-parallel
854854
855855
```cpp
856856
#include <omp.h>
857-
main()
857+
int main()
858858
{
859859
omp_set_dynamic(1);
860860
...

0 commit comments

Comments
 (0)