2016년 11월 20일 일요일

Flexibly convert string input to integer array




  • EOF(End Of File input method)
Windows : ^Z (Ctrl + Z)
Unix/Linux : ^D (Ctrl +D)



reference) K&R2 Book

Performance Comparison Source


chrono is a time libray added to C++11. It offers more functions than the existing ctime. Also, It can measure up to nano units.



Ex) Branch(if) VS % operation

When you use an array as a circular array, you must choose branch or % operation.
(This Example should overwrite the array if it is full.)