Skip to content

Commit cdaacdd

Browse files
authored
Overhaul example in C2033 error reference
1 parent 9be0d11 commit cdaacdd

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,12 @@ The following example generates C2033:
1919

2020
```cpp
2121
// C2033.cpp
22-
struct S {
23-
int *b : 1; // C2033
24-
};
25-
```
26-
27-
Possible resolution:
28-
29-
```cpp
30-
// C2033b.cpp
3122
// compile with: /c
32-
struct S {
33-
int b : 1;
23+
24+
struct S
25+
{
26+
int* ptr : 1; // C2033
27+
int& ref : 1; // C2033
28+
int arr[3] : 1; // C2033
3429
};
3530
```

0 commit comments

Comments
 (0)