Skip to content

Commit

Permalink
Merge pull request pezy#64 from Roller44/master
Browse files Browse the repository at this point in the history
注释掉 define 以消除 warning,将 ifdef 改为 ifndef
  • Loading branch information
pezy authored Jul 28, 2016
2 parents db732bd + ade4a0f commit 53e1dfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ch06/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ int calc(const int&, const int&); // calls lookup(const int&)
(b)
```cpp
int calc(char*, char*); // calls lookup(char*)
int calc(const char*, const char*); calls lookup(const char *)
int calc(const char*, const char*); //calls lookup(const char *)
```
(c)
Expand Down
4 changes: 2 additions & 2 deletions ch06/ex6_47.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ using std::vector;
using std::cout;
using std::endl;

#define NDEBUG
//#define NDEBUG

void printVec(vector<int>& vec)
{
#ifdef NDEBUG
#ifndef NDEBUG
cout << "vector size: " << vec.size() << endl;
#endif
if (!vec.empty()) {
Expand Down

0 comments on commit 53e1dfe

Please sign in to comment.