Skip to content

Commit

Permalink
Update ex3_35.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy committed Jun 20, 2015
1 parent 8f554ce commit 9edd0a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ch03/ex3_35.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ using std::cout; using std::endl;

int main()
{
int arr[10];
for (auto ptr = arr; ptr != arr + 10; ++ptr) *ptr = 0;
const int size = 10;
int arr[size];
for (auto ptr = arr; ptr != arr + size; ++ptr) *ptr = 0;

for (auto i : arr) cout << i << " ";
cout << endl;
Expand Down

0 comments on commit 9edd0a7

Please sign in to comment.