Skip to content

Commit 16fa847

Browse files
authored
Merge pull request MicrosoftDocs#2529 from MicrosoftDocs/master
12/3/2019 AM Publish
2 parents d0504e2 + d9f9d7c commit 16fa847

1,007 files changed

Lines changed: 2193 additions & 2193 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Ending the first line with \n is not sufficient.
2121

2222
The following sample generates C2001:
2323

24-
```
24+
```cpp
2525
// C2001.cpp
2626
// C2001 expected
2727
#include <stdio.h>
@@ -39,7 +39,7 @@ int main()
3939

4040
Spaces at the beginning of the next line after a line-continuation character are included in the string constant. None of the examples shown above embed a newline character into the string constant. You can embed a newline character as shown here:
4141

42-
```
42+
```cpp
4343
// C2001b.cpp
4444
#include <stdio.h>
4545

@@ -63,4 +63,4 @@ int main()
6363
printf_s("Hello,\
6464
world");
6565
}
66-
```
66+
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This error can also be generated as a result of compiler conformance work that w
1717

1818
The following sample generates C2004:
1919

20-
```
20+
```cpp
2121
// C2004.cpp
2222
// compile with: /DDEBUG
2323
#include <stdio.h>
@@ -34,7 +34,7 @@ int main()
3434
3535
Possible resolution:
3636
37-
```
37+
```cpp
3838
// C2004b.cpp
3939
// compile with: /DDEBUG
4040
#include <stdio.h>
@@ -45,4 +45,4 @@ int main()
4545
printf_s("DEBUG defined\n");
4646
#endif
4747
}
48-
```
48+
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The `#line` directive must be followed by a line number.
1313

1414
The following sample generates C2005:
1515

16-
```
16+
```cpp
1717
// C2005.cpp
1818
int main() {
1919
int i = 0;
@@ -23,10 +23,10 @@ int main() {
2323

2424
Possible resolution:
2525

26-
```
26+
```cpp
2727
// C2005b.cpp
2828
int main() {
2929
int i = 0;
3030
#line 0
3131
}
32-
```
32+
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Directives such as [#include](../../preprocessor/hash-include-directive-c-cpp.md
1313

1414
The following sample generates C2006:
1515

16-
```
16+
```cpp
1717
// C2006.cpp
1818
#include stdio.h // C2006
1919
```
2020

2121
Possible resolution:
2222

23-
```
23+
```cpp
2424
// C2006b.cpp
2525
// compile with: /c
2626
#include <stdio.h>
27-
```
27+
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ No identifier appears after a `#define`. To resolve the error, use an identifier
1313

1414
The following sample generates C2007:
1515

16-
```
16+
```cpp
1717
// C2007.cpp
1818
#define // C2007
1919
```
2020

2121
Possible resolution:
2222

23-
```
23+
```cpp
2424
// C2007b.cpp
2525
// compile with: /c
2626
#define true 1
27-
```
27+
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ The character appears immediately following the macro name. To resolve the error
1313

1414
The following sample generates C2008:
1515

16-
```
16+
```cpp
1717
// C2008.cpp
1818
#define TEST1"mytest1" // C2008
1919
```
2020
2121
Possible resolution:
2222
23-
```
23+
```cpp
2424
// C2008b.cpp
2525
// compile with: /c
2626
#define TEST2 "mytest2"
27-
```
27+
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The formal parameter list of a macro definition uses the identifier more than on
1515

1616
The following sample generates C2009:
1717

18-
```
18+
```cpp
1919
// C2009.cpp
2020
#include <stdio.h>
2121

@@ -31,7 +31,7 @@ int main()
3131

3232
Possible resolution:
3333

34-
```
34+
```cpp
3535
// C2009b.cpp
3636
#include <stdio.h>
3737

@@ -43,4 +43,4 @@ int main()
4343
printf_s("%d\n", macro2(2));
4444
printf_s("%d\n", macro3(2,4));
4545
}
46-
```
46+
```

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ The character is used incorrectly in the formal parameter list of a macro defini
1313

1414
The following sample generates C2010:
1515

16-
```
16+
```cpp
1717
// C2010.cpp
1818
// compile with: /c
1919
#define mymacro(a|) (2*a) // C2010
2020
#define mymacro(a) (2*a) // OK
21-
```
21+
```

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ If you need to find the initial declaration of the redefined type, you can use t
1717

1818
The following sample generates C2011 and shows one way to fix it:
1919

20-
```
20+
```cpp
2121
// C2011.cpp
2222
// compile with: /c
2323
struct S;
2424
union S; // C2011
2525
union S2; // OK
26-
```
26+
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ An `#include` directive lacks the required filename.
1313

1414
The following sample generates C2012:
1515

16-
```
16+
```cpp
1717
// C2012.cpp
1818
#include < // C2012 include the filename to resolve
1919
```
2020
2121
Possible resolution:
2222
23-
```
23+
```cpp
2424
// C2012b.cpp
2525
// compile with: /c
2626
#include <stdio.h>
27-
```
27+
```

0 commit comments

Comments
 (0)