摘要:
http://stackoverflow.com/questions/332030/when should static cast dynamic cast const cast and reinterpret cast be used http://www.cnblogs.com/pigerhan 阅读全文
摘要:
二分查找思路很简单,但要把程序写对,却很难,有兴趣的话,可以在网上查一下相关资料,下面给出两种常见的错误:(至于具体错误原因,可以分析程序的执行)错误程序1: 1 #include 2 using namespace std; 3 4 int binarySearch(int a[], int n, int key) 5 { 6 int low = 0; 7 int high = n - 1; 8 int mid; 9 while(low 2 using namespace std; 3 4 int binarySea... 阅读全文