Skip to content

Commit 8c1afc5

Browse files
authored
Merge pull request #5502 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main)
2 parents 1af81e2 + 9f384cb commit 8c1afc5

File tree

3 files changed

+321
-321
lines changed

3 files changed

+321
-321
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
description: "Learn more about: Compiler Error C2860"
33
title: "Compiler Error C2860"
4-
ms.date: "11/04/2016"
4+
ms.date: "03/16/2024"
55
f1_keywords: ["C2860"]
66
helpviewer_keywords: ["C2860"]
7-
ms.assetid: ccc83553-90ed-4e94-b5e9-38b58ae38e31
87
---
98
# Compiler Error C2860
109

11-
'void' cannot be an argument type, except for '(void)'
10+
'void' cannot be used as a function parameter except for '(void)'
1211

13-
Type **`void`** cannot be used as an argument type with other arguments.
12+
A function parameter cannot be of type **`void`**.
1413

1514
The following sample generates C2860:
1615

1716
```cpp
1817
// C2860.cpp
1918
// compile with: /c
20-
void profunc1(void, int i); // C2860
21-
void func10(void); // OK
19+
void func1(void x); // C2860
20+
void func2(void, int y); // C2860
21+
void func3(void); // OK
2222
```

docs/error-messages/compiler-errors-2/compiler-errors-c2800-through-c2899.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The articles in this section of the documentation explain a subset of the error
7676
| [Compiler error C2857](compiler-error-c2857.md) | '#include' statement specified with the /Yc*filename* command-line option was not found in the source file |
7777
| [Compiler error C2858](compiler-error-c2858.md) | command-line option '/Yc (/Fd*filename*)' inconsistent with precompiled header, which used '/Fd*filename*' (Obsolete in Visual Studio 2022.) |
7878
| [Compiler error C2859](compiler-error-c2859.md) | *filename* is not the *filetype* file that was used when this precompiled header was created, recreate the precompiled header. |
79-
| [Compiler error C2860](compiler-error-c2860.md) | 'void' cannot be an argument type, except for '(void)' |
79+
| [Compiler error C2860](compiler-error-c2860.md) | 'void' cannot be used as a function parameter except for '(void)' |
8080
| [Compiler error C2861](compiler-error-c2861.md) | '*declaration*': an interface member function cannot be defined |
8181
| [Compiler error C2862](compiler-error-c2862.md) | '*interface*': an interface can only have public members |
8282
| [Compiler error C2863](compiler-error-c2863.md) | '*interface*': an interface cannot have friends |

0 commit comments

Comments
 (0)