摘要: (创建态->就绪态)进程初始化完毕之后,会把进程PCB放入就绪队列当中 (就绪态 -> 运行态) (运行态 -> 阻塞态) (阻塞态 -> 就绪态) 把PCB放到正确的队列当中,并且保证PCB当中数据同时被修改 --> 原语来实现 阅读全文
posted @ 2021-07-23 16:00 毋纵年华 阅读(321) 评论(0) 推荐(0)
摘要: 总结:前置递增先对变量进行++,再计算表达式,后置递增相反 阅读全文
posted @ 2021-07-23 14:34 毋纵年华 阅读(58) 评论(0) 推荐(0)
摘要: 运行态、就绪态、阻塞态 创建态、结束态 阅读全文
posted @ 2021-07-22 19:25 毋纵年华 阅读(39) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<string> using namespace std; int main() { //整型 int a = 0; cout << "给整型变量a赋值:" << endl; cin >> a; cout << "a = " << 阅读全文
posted @ 2021-07-22 18:59 毋纵年华 阅读(27) 评论(0) 推荐(0)
摘要: 字符串类型 点击查看代码 int main() { //1、C风格字符串 //注意事项 // char 字符串名 [ ] // 等号后面要用 双引号包含起来字符串 char str[] = "hello"; cout << str << endl; cout << sizeof(str) << en 阅读全文
posted @ 2021-07-22 18:42 毋纵年华 阅读(51) 评论(0) 推荐(0)
摘要: sizeof关键字 实型 有效数字包括小数点以前的数字 float num1 = 3.14 f ; 默认情况下输出一个小数,小数点后最多显示6位有效数字 转义字符 点击查看代码 #include<iostream> #include<string> using namespace std; //转义 阅读全文
posted @ 2021-07-22 17:14 毋纵年华 阅读(285) 评论(0) 推荐(0)
摘要: 常量不可更改 const修饰的变量也称为常量 点击查看代码 #include<iostream> #include<string> using namespace std; //常量的定义方式 // 1、#define宏常量 #define WEEK 7 // 2、const修饰的变量,const修 阅读全文
posted @ 2021-07-22 16:29 毋纵年华 阅读(142) 评论(0) 推荐(0)
摘要: 引用 别名和原名操作同一块内存 引用注意事项 点击查看代码 #include<iostream> #include<string> using namespace std; int main() { int a = 10; //1、引用必须初始化 //int &b; //错误,必须初始化 int & 阅读全文
posted @ 2021-07-22 16:12 毋纵年华 阅读(100) 评论(0) 推荐(0)
摘要: new操作符 new基本语法 利用new在堆区中开辟一个数组,在堆区中开辟一段连续的内存空间 点击查看代码 #include<iostream> #include<string> using namespace std; //1、new的基本语法 int* func() { //在堆区创建一个整型数 阅读全文
posted @ 2021-07-21 19:54 毋纵年华 阅读(62) 评论(0) 推荐(0)
摘要: 栈区 点击查看代码 #include<iostream> #include<string> using namespace std; //栈区数据注意事项 -- 不要返回局部变量的地址 //栈区的数据由编译器管理开辟和释放 //形参数据也会放在栈区 int* func() { int a = 10; 阅读全文
posted @ 2021-07-21 19:20 毋纵年华 阅读(42) 评论(0) 推荐(0)