Skip to content

Commit 3e4adfa

Browse files
authored
Merge pull request #2637 from corob-msft/cr-1850-2
Address cpp-docs 'void main' issue 1850, part 2
2 parents 00480a9 + f6213ba commit 3e4adfa

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

docs/error-messages/compiler-warnings/compiler-warning-level-4-c4701.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void func(int size)
2929
free(p);
3030
}
3131

32-
void main()
32+
int main()
3333
{
3434
func(9);
3535
}
@@ -56,7 +56,7 @@ void func(int size)
5656
free(p);
5757
}
5858

59-
void main()
59+
int main()
6060
{
6161
func(9);
6262
}
@@ -65,4 +65,4 @@ void main()
6565
## See also
6666
6767
[Compiler Warning (level 4) C4703](../../error-messages/compiler-warnings/compiler-warning-level-4-c4703.md)<br/>
68-
[Warnings, /sdl, and improving uninitialized variable detection](https://www.microsoft.com/security/blog/2012/06/06/warnings-sdl-and-improving-uninitialized-variable-detection/)
68+
[Warnings, /sdl, and improving uninitialized variable detection](https://www.microsoft.com/security/blog/2012/06/06/warnings-sdl-and-improving-uninitialized-variable-detection/)

docs/error-messages/compiler-warnings/compiler-warning-level-4-c4703.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void func(int size)
2929
free(p);
3030
}
3131

32-
void main()
32+
int main()
3333
{
3434
func(9);
3535
}
@@ -56,7 +56,7 @@ void func(int size)
5656
free(p);
5757
}
5858

59-
void main()
59+
int main()
6060
{
6161
func(9);
6262
}
@@ -65,4 +65,4 @@ void main()
6565
## See also
6666
6767
[Compiler Warning (level 4) C4701](../../error-messages/compiler-warnings/compiler-warning-level-4-c4701.md)<br/>
68-
[Warnings, /sdl, and improving uninitialized variable detection](https://www.microsoft.com/security/blog/2012/06/06/warnings-sdl-and-improving-uninitialized-variable-detection/)
68+
[Warnings, /sdl, and improving uninitialized variable detection](https://www.microsoft.com/security/blog/2012/06/06/warnings-sdl-and-improving-uninitialized-variable-detection/)

docs/parallel/amp/using-tiles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void TilingDescription() {
128128
}
129129
}
130130

131-
void main() {
131+
int main() {
132132
TilingDescription();
133133
char wait;
134134
std::cin >> wait;

docs/parallel/amp/walkthrough-matrix-multiplication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ A is a 3-by-2 matrix and B is a 2-by-3 matrix. The product of multiplying A by B
9595
}
9696
}
9797

98-
void main() {
98+
int main() {
9999
MultiplyWithOutAMP();
100100
getchar();
101101
}
@@ -158,7 +158,7 @@ A is a 3-by-2 matrix and B is a 2-by-3 matrix. The product of multiplying A by B
158158
1. Modify the `main` method to call the `MultiplyWithAMP` method.
159159

160160
```cpp
161-
void main() {
161+
int main() {
162162
MultiplyWithOutAMP();
163163
MultiplyWithAMP();
164164
getchar();
@@ -302,7 +302,7 @@ To implement this algorithm, the code:
302302
1. Modify the main method to call the `MultiplyWithTiling` method, as shown.
303303

304304
```cpp
305-
void main() {
305+
int main() {
306306
MultiplyWithOutAMP();
307307
MultiplyWithAMP();
308308
MultiplyWithTiling();

docs/standard-library/file-system-navigation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ wstring DisplayPathInfo()
8282
return wos.str();
8383
}
8484

85-
void main(int argc, char* argv[])
85+
int main(int argc, char* argv[])
8686
{
8787
wcout << DisplayPathInfo() << endl;
8888
// wcout << ComparePaths() << endl; // see following example
@@ -161,7 +161,7 @@ A `path` object is implicitly convertible to `std::wstring` or `std::string`. Th
161161
using namespace std;
162162
using namespace std::experimental::filesystem;
163163

164-
void main(int argc, char* argv[])
164+
int main(int argc, char* argv[])
165165
{
166166
wchar_t* p = L"C:/Users/Public/Documents";
167167
path filePath(p);

docs/standard-library/iomanip-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void show_quoted_v_nonquoted()
167167
cout << "Quoted : " << extracted_quoted << endl;
168168
}
169169
170-
void main(int argc, char* argv[])
170+
int main(int argc, char* argv[])
171171
{
172172
show_quoted_v_nonquoted();
173173
@@ -243,7 +243,7 @@ void show_custom_escape()
243243
// after round-tripping.
244244
}
245245

246-
void main(int argc, char* argv[])
246+
int main(int argc, char* argv[])
247247
{
248248
cout << "Custom delimiter:" << endl;
249249
show_custom_delimiter();

0 commit comments

Comments
 (0)