xuanli98 / gitment-comments Goto Github PK
View Code? Open in Web Editor NEW博客评论系统
博客评论系统
https://algorithmlixuan.github.io/2018/10/11/c++lession4/#more
一、内联函数 前言:函数调用是有时间开销的,如果函数本身只有几行代码,而且执行很快,那么相比下调用函数所产生的这个开销就会显得比较大。 为了减少函数调用的开销,就引入内联函数机制。编译器处理对内联函数的调用语句,是将整个函数的代码插入到调用语句处,而不会产生调用语句,关键字为inline。举个栗子: 但内联函数也是有缺点的,以下列出了内联函数的优缺点: 优点 缺点 1. 内联函数
https://algorithmlixuan.github.io/2018/10/03/c++lesson2/
一、定义常量例: 12const int MAX_VAL = 520;const string SCHOOL_NAME = "HIT"; 二、定义常量指针注意:不可通过常量指针修改其指向的内容例: 12345int n,m;const int *p = &n;*p = 5; //报错n = 1314; //正确p = &m; //ok,常量指针的指向可以变化 注意:不能把常量
https://algorithmlixuan.github.io/2018/10/11/c++lesson2/
一、定义常量例: 12const int MAX_VAL = 520;const string SCHOOL_NAME = "HIT"; 二、定义常量指针注意:不可通过常量指针修改其指向的内容例: 12345int n,m;const int *p = &n;*p = 5; //报错n = 1314; //正确p = &m; //ok,常量指针的指向可以变化 注意:不能把常量
https://algorithmlixuan.github.io/tags/
一个老程序猿的日常
https://algorithmlixuan.github.io/2018/10/09/c++lession4/#more
一、内联函数 前言:函数调用是有时间开销的,如果函数本身只有几行代码,而且执行很快,那么相比下调用函数所产生的这个开销就会显得比较大。 为了减少函数调用的开销,就引入内联函数机制。编译器处理对内联函数的调用语句,是将整个函数的代码插入到调用语句处,而不会产生调用语句,关键字为inline。举个栗子: 但内联函数也是有缺点的,以下列出了内联函数的优缺点: 优点 缺点 1. 内联函数
https://algorithmlixuan.github.io/2018/10/11/c++lesson3/
一、用new运算符实现动态内存分配第一种用法,分配一个变量 123456P = new T;/* T是任意类型名,P是类型为T的指针 *动态分配出一片大小为sizeof(T)字节的内存空间 *并将改内存的起始地址赋值给P */ 举一个具体的栗子: 123int *p;p = new int;p = 5; 第二种用法,分配一个数组 12345678/ * T :任意类型名 * P :类型为T
https://algorithmlixuan.github.io/2018/10/03/c++lesson1/#more
一、引用的概念形式:类型名 & 引用名 = 某变量名;注意:定义某个引用时一定要将其初始化为某个引用变量。 12int n = 520;int & r = n; 某个变量的引用,等价于这个变量相当于这个变量的别名 123456int n = 520;int & r = n;cout << r; //输出 520cout << n; n = 131
https://algorithmlixuan.github.io/2018/10/11/c++lesson1/
一、引用的概念形式:类型名 & 引用名 = 某变量名;注意:定义某个引用时一定要将其初始化为某个引用变量。 12int n = 520;int & r = n; 某个变量的引用,等价于这个变量相当于这个变量的别名 123456int n = 520;int & r = n;cout << r; //输出 520cout << n; n = 131
https://algorithmlixuan.github.io/2018/10/05/c++lesson3/
一、用new运算符实现动态内存分配第一种用法,分配一个变量 123456P = new T;/* T是任意类型名,P是类型为T的指针 *动态分配出一片大小为sizeof(T)字节的内存空间 *并将改内存的起始地址赋值给P */ 举一个具体的栗子: 123int *p;p = new int;p = 5; 第二种用法,分配一个数组 12345678/ * T :任意类型名 * P :类型为T
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.