If you understand it (i.e you didn't copy it) and it does as intended then I don't see why not.
The end part <for(;

std::cin.get();> seems a bit retarded though.
Reputation Points: 1536
Solved Threads: 431
Posting Expert
Offline 5,865 posts
since Aug 2005