自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

陨落烟雨的博客

选择对的事坚持着!

  • 博客(16)
  • 收藏
  • 关注

原创 (C/C++学习笔记)线性表的顺序存储

线性表接口声明#ifndef __MY_SEQLIST_H__ #define __MY_SEQLIST_H__typedef void SeqList;typedef void SeqListNode;SeqList* SeqList_Create(int capacity);void SeqList_Destroy(SeqList* list);void SeqList_Clear(Se

2015-08-20 00:31:27 543

原创 Lua 语言基础

a = { 10, 20, "sdfsdf"}-- 数组定义a[1] = 1;a[2] = 3;a[3] = "hello world"-- 交换变量a,b = 1,2b,a = 2,111c = 1c = c + 1function add(a ,b) return a , bendprint(add(a,b))-- print("helle" +

2015-08-19 15:10:06 586

原创 (C/C++学习笔记)函数模板的深入理解

#include "iostream"#include "cstdlib"using namespace std;/*函数模板的深入理解 ― 编译器并不是把函数模板处理成能够处理任意类型的函数 ― 编译器从函数模板通过具体类型产生不同的函数 ― 编译器会对函数模板进行两次编译 ― 在声明的地方对模板代码本身进行编译 ― 在调用的地方对参数替换后的代码进行编

2015-08-19 10:09:53 550

原创 (C/C++学习笔记)函数模板遇上函数重载

/* 1 函数模板可以像普通函数一样被重载 2 C++编译器优先考虑普通函数 3 如果函数模板可以产生一个更好的匹配,那么选择模板 4 可以通过空模板实参列表的语法限定编译器只通过模板匹配*//*函数模板不允许自动类型转化普通函数能够进行自动类型转换*/#include <iostream>using namespace std;int Max(int a

2015-08-19 10:00:06 524

原创 动态代理应用场景 Java

package com.lcj.dongtaidaili;import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.lang.reflect.Proxy;public class 动态代理 {/** * 动态代理: * 最明显的功能就是可以实现方法过滤,从而在需要的方法上添

2015-08-18 17:47:11 2107

原创 装饰设计模式 Java版

package com.lcj.zhuangshi;interface 动物{public void 吃();public void 叫();}public class zhuangshi { public static class 狗 implements 动物{ public void 吃(){ System.out.println("咳咳咳

2015-08-18 17:12:00 410

原创 (C/C++学习笔记)函数模板加强

#include "iostream"using namespace std;//定义模板函数,T 为传入的类型template<typename T>void sortArray(T *a, int num){ int i =0, j = 0; T tmp; for (i=0; i<num; i++) { for (j=i; j<num; j+

2015-08-18 09:57:04 471

原创 (C/C++学习笔记)泛型编程基础

#include "iostream"using namespace std;void swap(int &a, int &b){ int c ; c = a; a = b; b = c;}void swap(float &a, float &b){ float c ; c = a; a = b; b = c;}void

2015-08-18 09:52:41 593

原创 (C/C++学习笔记)指针做函数参数形成回调练习

指针做函数参数练习#include "stdio.h"#include "stdlib.h"#include "string.h"int add(int a, int b);//第二个函数 是函数指针 做函数参数 //在这个函数里面,就可以通过这个函数指针,去调用外部的函数,形成一个回调int libfun( int (*pDis)(int a, int b) );int main(v

2015-08-17 13:58:29 418

原创 (C/C++ 学习笔记)函数指针语法基础

#include "stdio.h"#include "stdlib.h"#include "string.h"int array2[10];//定义一个数组类型typedef int (ArrayType)[10];//定义一个指向数组的 数组指针类型 typedef int (*PArrayType)[10]; // int *void main_数组类型复习(){ //

2015-08-17 13:56:56 646

原创 (C/C++学习笔记)多继承的二义性

#include "iostream"using namespace std;class base{public: int k; void printI() { //cout<<i<<endl; }protected:private:};class base1 : virtual public base{public: int i;

2015-08-09 20:18:17 564

原创 (C/C++学习笔记)操作符重载的两种方法

#include "iostream"using namespace std;//a+biclass Complex{private: int a; int b; //通过友元函数实现+操作 friend Complex operator+(Complex &c1, Complex &c2);public: Complex(int a = 0, i

2015-08-08 14:39:06 724

原创 (C/C++学习笔记操作符重载入门)

#include "iostream"using namespace std;//a+biclass Complex{public: int a; int b;public: Complex(int a = 0, int b = 0) { this->a = a; this->b = b; } void pri

2015-08-08 14:12:31 538

原创 (C/C++学习笔记)Copy构造函数应用场景

Copy构造函数应用场景#include"iostream"using namespace std;class Location{private: int X,Y;public: Location(int xx = 0 , int yy = 0) { X = xx; Y = yy; cout << "Constructor

2015-08-07 09:55:44 759

原创 (C/C++学习笔记)指针做函数参数形成回调

#include "stdio.h"#include "stdlib.h"#include "string.h"int add(int a, int b);//第二个函数 是函数指针 做函数参数 //在这个函数里面,就可以通过这个函数指针,去调用外部的函数,形成一个回调int libfun( int (*pDis)(int a, int b) );int main(void){

2015-08-06 09:43:14 501

原创 (C/C++学习笔记)临时对象深入理解

临时对象深入理解/*1 C++中提供了初始化列表对成员变量进行初始化2 使用初始化列表出现原因:1.必须这样做:如果我们有一个类成员,它本身是一个类或者是一个结构,而且这个成员它只有一个带参数的构造函数,而没有默认构造函数,这时要对这个类成员进行初始化,就必须调用这个类成员的带参数的构造函数,如果没有初始化列表,那么他将无法完成第一步,就会报错。2、类成员中若有const修饰,必须在对

2015-08-05 14:31:56 746

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除