2018.2.16
2025.5.12
ruby
1151
3 分钟整数类型: 3,222 小数: 3.14 字符串: hello,world 布尔类型: true(TrueClass),false(FalseClass) 数组: [1,2],["hello","hello world"] Hash(字典): {"name"=>"luo","age"=>24},{:name=>"daoyi",:age=>24} Symbol 2018.2.16
2025.5.12
ruby
591
2 分钟Method(Function) 1 2 3 4 5 6 7 8 9 def hi(name) p "hi " + name end hi("666") # => "hi 666" hi "code" #括号省略 => "hi code" def hello name p "hello #{name}" end hello "world" 2018.2.16
2025.5.12
CPP
1742
4 分钟多态的实现原理 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 2018.2.10
2025.5.12
CPP
457
1 分钟继承 子类从父类继承成员变量 子类从父类继承成员函数 #include "stdafx.h" class Person { public: int Age; int Sex; void Word() { printf("Person:Work"); } }; class Teacher:public 2018.2.2
2025.5.12
linux /安全
66
1 分钟#阿里云kali源 deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-free deb-src http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-free #中科大kali源 2018.1.30
2025.5.12
CPP
2277
5 分钟我们可以在什么地方创建对象? 全局变量区 Person p; 栈 void Max() { Person p; } 堆 new 和 delete //在堆中创建对象: 2018.1.30
2025.5.12
CPP
868
2 分钟好的编程习惯 -定义和实现分开 代码会有更好的可读性 但不是必须的 在头文件中只留下声明代码 2018.1.28
2025.5.12
CPP
254
1 分钟什么是继承 struct Person { int age; int sex; }; struct Teacher { int age; int sex; int level; int classId; }; struct Teacher:Person { int level; int classId; }; 总结: 1、什么是继 2018.1.28
2025.5.12
CPP
762
2 分钟什么是构造函数 #include "stdafx.h" #include struct Sclass { int a; int b; int c; int d; Sclass()//构造函数 { printf 2018.1.27
2025.5.12
C-lang
210
1 分钟什么是预处理 预处理一般是指在程序源代码被转换为二进制代码之前,由预处理器对程序源代码 2018.1.25
2025.5.12
数据结构
890
2 分钟实现思想 :通过指针把要元素串起来 简单结构图 struct Student { char name[10]; int score; } struct Node { Student Element; Node* next; } 每一个节点 2018.1.21
2025.5.12
CPP
988
2 分钟封装 C语言和C++语言的区别 C++是对C的补充扩展,C原有的语法C++都支持,并在此 2018.1.20
2025.5.12
C-lang
389
1 分钟函数调用约定 就是告诉编译器:怎么传递参数,怎么传递返回值,怎么平衡堆栈 int method(int x,int y) { return x+y; 2018.1.18
2025.5.12
C-lang
822
2 分钟指针数组的定义 char arr[10]; //10 char char* arr[10]; //10 指针(char*) Point* arr[10]; //10 指针(Point*) int******** arr[10]; 指针数组 2018.1.17
2025.5.12
C-lang
136
1 分钟探测结构体指针的特性 struct Point { int x; int y; } ++、– 加法与减法 指针相减 使用结构体指针 //创建 2018.1.17
2025.5.12
C-lang
144
1 分钟一级指针和多级指针 int i =100; int* p1 = &i; int** p2 = &p1; int*** p3 = &p2; int**** p4 = &p3; int***** p5 = &p4 int****** p6 = &p5; int******* p7 = &p6; int****** px1 2018.1.15
2025.5.12
C-lang
302
1 分钟字符串的几种表示方式有什么区别? char str[6] = {"A","B","C","D","E","F"}; //"\0" 或者0 --堆栈中 局部变量 char str[] = "ABCDE"; //编译器 2018.1.14
2025.5.12
C-lang
60
1 分钟基本类型参数传递 int x =1; void plus(int p) { p = p+1; } printf("%d \n",x); //x的值是多少? 数组作为参数 编写一个函数 2018.1.12
2025.5.12
C-lang
221
1 分钟“*”的几种用途 乘法运算符 int x = 1; int y = 2; int z = x * y; 定义新的类型 char x; char* x; 取值运算符 2018.1.12
2025.5.12
C-lang
273
1 分钟&符号是取地址符,任何变量都可以使用&来获取地址,但不能用在常量上 struct