2014年8月21日星期四

Small tricks

This to keep track of the small tricks I run into that may be useful.

1. pause in C++
system("pause"): this is not a very good way to pause in C++ because it relies on the platform you compile and run. It does not work for my ubuntu system. Basically, system() will run the shell command.
cin.ignore(); This works out for me. I think this has the effect of "press any key to continue".

没有评论:

发表评论