Skip to content

Commit

Permalink
Merge pull request pezy#81 from pezy/master
Browse files Browse the repository at this point in the history
Fixed ex12.26.cpp
  • Loading branch information
Mooophy committed Nov 29, 2014
2 parents b5e5d25 + 3baa3f5 commit 739263d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ch12/ex12.26.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ int main()
p_movable = p;

//! print the strings constructed.
while(p_movable != p + 3)
std::cout << *p_movable++ <<"\n";
while(p_movable != p + 3){
std::cout << *p_movable <<"\n";
alloc.destroy(p_movable);
++p_movable;
}

//! free the allocated memory.
delete[] p;
alloc.deallocate(p, 5);



Expand Down

0 comments on commit 739263d

Please sign in to comment.