⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 binarysearch.h

📁 小程序,VC++处学者用的,关于二分法查找的 经典的BINARYSEARCH算法..不错哦
💻 H
字号:
//************      BinarySearch.h      *************

# ifndef BINARYSEARCH_H
# define BINARYSEARCH_H

#include <iostream>
using namespace std;


class Binarysearch
{
public:
	Binarysearch( int *xbptr,int xsearchKey,int xlow,int xhigh,int xsize );//constructing function
	int bSearch ( int a, int b[ ] );  // search element a in the array of b
	void sort( int xa[], int xsize ); // sort the numbers you input
	~Binarysearch();                  // destructing function

private:
	
	int size;         // size of the array you input
	int * bptr;       // point to the array 
	int a;            //the number you search
	int low;          //  0
	int high;         // n-1
	
};

# endif;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -