代码搜索结果
找到约 10,000 项符合
9 的代码
9_13.h
//9_13.h
#ifndef ARRAY_BASED_SORTING_FUNCTIONS
#define ARRAY_BASED_SORTING_FUNCTIONS
// 辅助函数:交换x和y的值
template
void Swap (T &x, T &y)
{
T temp;
temp = x;
x = y;
y
9_6.cpp
//9_6.cpp
#include
#include
#include "9_6.h"
using namespace std;
template
Node *LinkedList::GetNode(const T& item, Node* ptrNext) //生成新结点
{
Node
9_14.h
//9_14.h
#ifndef SEARCH_METHODS
#define SEARCH_METHODS
//用顺序查找法在数组list中查找值为key的元素
//若找到,返回该元素下标,否则返回-1
template
int SeqSearch(T list[], int n, T key)
{
for(int i=0;i < n;i++)
9_10.h
///9_10.h
#ifndef QUEUE_CLASS
#define QUEUE_CLASS
#include
#include
using namespace std;
const int MaxQSize = 50; //队列元素最大个数
//类的声明
template
class Queue
{
9_15.h
//9_15.h
#ifndef SEARCH_METHODS
#define SEARCH_METHODS
// 用折半查找方法,在元素呈升序排列的数组list中查找值为key的元素
template
int BinSearch(T list[], int n, T key)
{
int mid, low, high;
T midvalue;
9_2.cpp
//9_2.cpp
#include
#include
using namespace std;
struct Student // 结构体Student
{
int id; //学号
float gpa; //平均分
};
9_10.cpp
//9_10.cpp
#include
#include
#include
#include
#include "9_10.h"
using namespace std;
void main()
{
int a[10]={0,1,2,3,4,5,6,7,8,9};
Queue
9_6.h
//9_6.h
#ifndef LINKEDLIST_CLASS
#define LINKEDLIST_CLASS
#include
#include
using namespace std;
#ifndef NULL
const int NULL = 0;
#endif // NULL
#include "9_5.h"
9_4.cpp
//9_4.cpp
#include
#include
#include "9_3.h"
using namespace std;
void main(void)
{
Array A(10); // 用来存放质数的数组,初始状态有10个元素。
int n; //质数范围的上限,运行时输入
int p
9_8.h
//9_8.h
#ifndef STACK_CLASS
#define STACK_CLASS
#include
#include
using namespace std;
const int MaxStackSize = 50; //栈的大小,即栈中元素的最大个数
//类的声明
template
cla