object.h
来自「回朔解决0-1背包,里面有VC++的代码,可供大家参考,如里有误的,请和我联系」· C头文件 代码 · 共 15 行
H
15 行
class Object
{
friend float Knapsack(float *,float *,float ,int);
friend void Swap(Object &a,Object &b);
friend int Partition(Object *a,int p,int r);
friend void QuickSort(Object *a,int p,int r);
public:
int operator<=(Object a)const
{
return(d>=a.d);
}
private:
int ID;
float d;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?