Skip to content

Commit b95c1ea

Browse files
author
Colin Robertson
authored
Merge pull request #1546 from TedLyngmo/iostream_h
Use <iostream> instead of <iostream.h> in Example Code for PCH
2 parents c6e3ec4 + c015a0d commit b95c1ea

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/build/creating-precompiled-header-files.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Precompiled Header Files"
3-
ms.date: "08/19/2019"
3+
ms.date: "10/24/2019"
44
helpviewer_keywords: ["precompiled header files, creating", "PCH files, creating", "cl.exe compiler, precompiling code", ".pch files, creating"]
55
ms.assetid: e2cdb404-a517-4189-9771-c869c660cb1b
66
---
@@ -169,9 +169,9 @@ UNSTABLEHDRS = unstable.h
169169
CLFLAGS = /c /W3
170170
# List all linker options common to both debug and final
171171
# versions of your code here:
172-
LINKFLAGS = /NOD /ONERROR:NOEXE
172+
LINKFLAGS = /nologo
173173
!IF "$(DEBUG)" == "1"
174-
CLFLAGS = /D_DEBUG $(CLFLAGS) /Od /Zi /f
174+
CLFLAGS = /D_DEBUG $(CLFLAGS) /Od /Zi
175175
LINKFLAGS = $(LINKFLAGS) /COD
176176
LIBS = slibce
177177
!ELSE
@@ -247,7 +247,7 @@ void savetime( void );
247247
//
248248
#ifndef __UNSTABLE_H
249249
#define __UNSTABLE_H
250-
#include<iostream.h>
250+
#include<iostream>
251251
void notstable( void );
252252
#endif // __UNSTABLE_H
253253
```
@@ -260,6 +260,7 @@ void notstable( void );
260260
#include"another.h"
261261
#include"stable.h"
262262
#include"unstable.h"
263+
using namespace std;
263264
// The following code represents code that is deemed stable and
264265
// not likely to change. The associated interface code is
265266
// precompiled. In this example, the header files STABLE.H and

0 commit comments

Comments
 (0)