搜索资源列表
cc
- C++ 工程实践(1):慎用匿名 namespace 匿名 namespace (anonymous namespace 或称 unnamed namespace) 是 C++ 的一项非常有用的功能,其主要目的是让该 namespace 中的成员(变量或函数)具有独一无二的全局名称,避免名字碰撞 (name collisions)。一般在编写 .cpp 文件时,如果需要写一些小的 helper 函数,我们常常会放到匿名 namespace 里。muduo 0.1.7 中的 muduo/base/
CPP-read-and-write
- C++实现读写文件,使用自定义函数,和系统自带的函数实现-C++ read and write files, use the function to achieve self-defined functions, and the system comes with
CPP
- 本程序关键点在于函数的声明,在这里函数声明不能省略,如果第三第四行的函数声明:void add(int x,int y) 和void add2(float x,float y) 省略了,则在接下来定义的函数add里面的调用add2:[add2(x,y) ]会提示出错,因为没有声明的情况下,系统不知道调用的add2或者本身的add是 什么意思-The key points of the program lies in the function declaration, functio
duotai-CPP
- 利用虚函数实现的多态性来求四种几何图形的面积之和。这四种几何图形是:三角形、矩形、正方形和圆。几何图形的类型可以通过构造函数或通过成员函数来设置。-The use of virtual functions to find four kinds of polymorphism of the area of geometry. The four geometry are: triangular, rectangular, square and round. Geometr
xianxingbiao
- 实现顺序表的基本操作(最终提交“.cpp”) 程序要求: 先给出顺序表的类型定义 给出顺序表的如下基本操作的算法函数定义 构造一个空的线性表:InitList_Sq(SqList &L) 在顺序表L的第i个位置之前插入新的元素e:ListInsert_Sq(SqList &L, int I, ElemType e) 在顺序表L中删除第i个元素,并用e返回其值:ListDelete_Sq(SqList &L, int I, ElemTy