搜索资源列表
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
xxbgb
- 首先,用前插法建立链表,在算法中以create函数表示;其次,定义mergeab函数,表示算法的归并: 本算法的思路为:顺次逐个将单链表的ha中的节点(P节点)在链表 hb中查找是否有重复的结点,若有,则不插入到链表hb中,将其从链表ha中删除。若在链表hb中找到第一个大于P的节点的数据域值的节点(Q节点),则在Q节点之前插入P节点,否则将链表ha联接到链表hb的表尾。为了实现方便在单连表hb之前附加一个表头节点,带归并完成后,再归还该表头节点,返回归并后连表的头指针。 最后,
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
nni
- 计算n阶矩阵的逆矩阵的函数,输入表示矩阵的指针和阶数,然后计算输出逆矩阵的指针,附带矩阵乘法检测结果-Calculation of n-order matrix inverse matrix function, enter the matrix express the pointer and order, and then calculating the inverse matrix of output indicators, with matrix multiplication test re
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
FreePtr
- 这是一个很好的帮助类,在适用STL的容器的时候,可以配合for_each算法函数删除容器中的指针对象-This is a very good help category, where applicable, the STL containers, they can function with the for_each algorithm to delete the pointer container object
CSparse_matrix_tar
- csparse是《Direct Methods for Sparse Linear Systems》一书配套的源码教程,是稀疏矩阵在数值计算中的代码的例程,内含matlab接口,在数据压缩存储,大规模稀疏线性系统求解,游戏建模等方面有广泛的应用,且代码简洁高效,便于阅读学习。-CSparse is concise and simple to understand and thus suitable for a textbook, yet it is also industrial-strengt
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
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,
FFT-Algorithm
- 本例通过VC实现二维快速傅里叶变换,涉及到进行矩阵、复数等数学运算,运用了C语言动态内存分配、文件操作、结构指针的函数调用等内容。-In this case through the VC to achieve two-dimensional fast Fourier transform, related to the matrix, such as complex mathematics, use the C language, dynamic memory allocation, file o
na7
- Orthogonal Polynomials Approximation 数值分析,计算正交基多项式的系数 -Given a function f and a set of m >0 distinct points . You are supposed to write a function to approximate f by an orthogonal polynomial using the exact function values at the given m poin
test2
- 已知两个函数 ,求它们在指定区间的定积分,要求用矩形法编制求解定积分的通用函数(函数中可用函数型参数或函数指针型参数)。-The known two function, let them in the designated the definite integral interval, the requirement with rectangle method of the definite integral solution of general function (function type
FunPointer
- C/C++中的函数指针的声明和使用,与C#中的委托类似,可以实现类似范型的功能。-The sample of function pointer in C/C++.
Definite-integral-algorithm
- 该文档中用C语言实现通用函数的定积分,源码中采用指向函数的指针作函数参数,整个功能实现的效率高,可以为读者们提供很好的语言编写思路。-This document using C language to achieve universal function definite integral, using the source code for the function pointer to a function parameter functions to achieve high overal