搜索资源列表
func_ptr
- 一个函数指针的例子,C++语言,我在初学C++时写的,可以参考一下-a function pointer example, C language, I was learning C, can take a look
cstring
- 定义一个字符串类String,其私有成员为一个字符串指针。设计构造函数,拷贝构造函数,析构函数,设置新值函数Set, 打印成员值函数Print。借助此String类,将操作符"=="、">"、"<"的重载函数设置为String类的成员函数,实现对操作符"=="、">"、"<"的重载,使之能直接比较两个String类类型的字符串的大小,设计各种情况调用此三个重载操作符。-definition of a string type String, its private members as a str
pro
- 如果采用单链表保存单词,可采用如下办法压缩存储空间。如果两个单词的后缀相同,则可以用同一个存储空间保存相同的后缀。例如,原来分别采用单链表保存的单词Str1“abcdef”和单词Str2“dbdef”,经过压缩后的存储形式如下。 请设计一个高效的算法完成两个单链表的压缩存储,并估计你所设计算法的时间复杂度。 要求:阅读预设代码,编写函数SNODE * ziplist( SNODE * head1, SNODE * head2 ) ziplist的功能是:
C_C++pointer
- 指针是C和C++语言编程中最重要的概念之一,也是最容易产生困惑并导致程序出错的问题之一。利用指针编程可以表示各种数据结构, 通过指针可使用主调函数和被调函数之间共享变量或数据结构,便于实现双向数据通讯;并能像汇编语言一样处理内存地址,从而编出精练而高效的程序。指针极大地丰富了C和C++语言的功能。-Pointer is a C and C++ Language programming in the concept of one of the most important and most eas
adsfawerwaer
- 数据结构循环队列的实现 实现用指针的删除查找功能 性能良好-Circular Queue data structure realize the delete using the search function pointer in good
paixu
- 用指向指针的 方法对n个整数排序并输出。要求将排序单独写成一个函数,n和各整数在主函数中输入,最后在主函数中输出。-Pointer with the pointer point to the method of sorting n integers and output. Requirements will be sorted into a separate function, n and the integer function in the main input, the final out
sequenlistreversing
- 用双重指针法建立顺序表,并实现顺序表逆置,注意主调函数调用建立顺序表函数时实参的形式-The order established by using a double pointer to the table, and to achieve the order of the table against the home, pay attention to the main theme of the function call to establish the order of the table
sequenlistreversing2
- 用指针的引用建立顺序表,并实现顺序表的逆置,注意主调函数调用建立顺序表函数传递实参的形式-Established with reference to the order of the table pointer, and realize the inverse order of the table set, pay attention to the main theme of the function call to establish the order of the table functi
xu
- 掌握线性表的结构特点。 掌握线性表的基本操作:初始化,插入,删除,查找,判空,求线性表长度等运算在顺序存储结构和链式存储结构上的实现。 通过本章实验帮助学生加深对C语言的使用(特别是函数的参数调用、指针类型的应用)。-Grasp the characteristics of the linear structure of the table. Master the basic operation of the linear form: initialization, insert, de
CQueue
- 设计一个使用队头指针和计数器无队尾指针的顺序循环队列,并编写一个主函数进行测试。 -Design a counter using the head of the queue pointer and tail pointer of the order of non-circular queue, and write a main function for testing.
Generic-function
- 泛型函数: 总结:使用标准模板库 (STL) C++标准库提供了更为安全,更为灵活的数据集处理方式。 STL的最主要的两个特点:数据结构和算法的分离,非面向对象本质。 访问对象是通过象指针一样的迭代器实现的;容器是象链表,矢量之类的数据结构,并按模板方式提供; 算法是函数模板,用于操作容器中的数据。由于STL以模板为基础,所以能用于任何数据类型和结构。-Generic function: Summary: Using the Standard Template Library
sort2
- 一个基于VC的数组排序算法源码实例,程序中使用了函数指针数组,一共包含四种排序方法:泡沫排序法(bubble)、插入排序法(insertion)、快速排序法(quick)和选择排序法(selection)。在头文件中还使用了模板技术,以便可以同时实现几种类型的排序算法。 -A sorting algorithm based on an array of source code VC instance, the program uses the function pointer array,
pouya
- call function with pointer method
QuickSort
- 快速排序函数,使用快速排序的方法对指针L所指向的结构体中的成员 — 数组Key 中的数据进行排序。成功时,返回1,否则返回0-Quick sort function, the method of using the quick sort pointer L points to the members of the structure- the array to sort the data in the Key. Success, returns 1, otherwise 0
shangchuanchengxu2
- 用指向指针的 方法对n个整数排序并输出。要求排序单独写成一个函数。整数和n在主函数中输入。最后在主函数中输出。-With a pointer to a pointer of the method of sorting n integers and output. Requires a separate written as a sort function. Integer and n in the main function of the input. Finally, in the main
goso_list_copy
- goso笔试题代码:带随机指针的单链表复制程序-Copy function of linked list with random pointer
exe6_16
- 考虑用双向链表来实现一个有序表,使得能在这个表中进行正向和反向搜索。若指针p 总是指向最后成功搜索到的结点,搜索可以从p 指示的结点出发沿任一方向进行。试根据这种情况编写一个函数search(head, p, key),检索具有关键码key 的结点,并相应地修改p。-Consider the use of two-way linked list to implement a sorted list in this table allows both forward and reverse sea
demo
- (1)输入字符序列,建立二叉链表。 (2)遍历二叉树输出。 (3)请设计一个算法,要求该算法把二叉树的叶子结点按从左到右的顺序连成一个单链表,表头指针为head。 二叉树按二叉链表方式存储,链接时用叶子结点的右指针域来存放单链表指针。请遍历该链表输出所有叶子结点,然后再先序遍历二叉树输出所有叶子结点,并对比两个输出结果,看是否相同。 (4)试写一算法判断某二叉树是否是完全二叉树。 (5)试写一算法判断某二叉树是否是二叉排序树。 (6)在主函数中设计一个简单的菜单,分别调试上
Cdepthprofiling
- C语言深度剖析 C语言使用的要点,对C语言的关键字的使用、函数调用、指针、结构体、文件读写等做了深入剖析,许多内容一般的教科书没有涉及-C language depth analysis of the main points of the C language, use the C language keywords, function calls, pointer, structure, file reading and writing in-depth analysis, many elem
FunPointer
- C/C++中的函数指针的声明和使用,与C#中的委托类似,可以实现类似范型的功能。-The sample of function pointer in C/C++.