
cpp/c
文章平均质量分 80
不做毛毛虫
这个作者很懒,什么都没留下…
展开
-
c++私有成员函数
#includeclass Integer{public: Integer() { std::cout<<"Constructor Integer"<<std::endl; } void seta(int bv) { a=bv;//类中数据成员的形参与类的数据成员重名 } void set(int v1,int v2,int v3) { seta(v1);原创 2014-12-07 12:08:24 · 5986 阅读 · 0 评论 -
自增自减运算符
x = x+++y+++x++;printf ( "x=%d,z=%d,y=%d\n", x,z,y);y= ++x + ++y;printf ( "x=%d,y=%d\n", x,y);x = x-- +y-- +x--;printf ( "x=%d,z=%d,y=%d\n", x,z,y);y = --x+--y;printf ( "x=%d,z=%d,y=原创 2016-02-23 08:52:14 · 465 阅读 · 0 评论 -
auto_ptr 源码解析
就是acclerated c++中所说的 通用句柄类,具体见注释!#define _THROW0() noexcepttemplate class auto_ptr;template struct auto_ptr_ref { // proxy reference for auto_ptr copying explicit auto_ptr_ref(_Ty *_Right)原创 2016-08-29 20:17:34 · 538 阅读 · 0 评论 -
c/c++ 指针 归纳一
// cpp-test.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"void print_array_elment(int a[3], int size){ /*数组作为形参时,退化为指针,不能通过sizeof获取数组的内存大小 ,获取的是指针的大小,commented by zhaoyulong,2016.8.14*/ printf("\n原创 2016-08-14 21:05:59 · 943 阅读 · 0 评论 -
std::chrono时间相关
#define _XTIME_NSECS_PER_TICK 100#define _XTIME_TICKS_PER_TIME_T (long long)10000000时钟system_clocksteady_clockhigh_resolution_clocktypedef steady_clock high_resolution_clock;chrono::system_cl...原创 2019-10-01 22:46:09 · 780 阅读 · 0 评论