摘要: 1.概述 转义字符(Escape character),所有的ASCII码都可以用“\”加数字(一般是8进制数字)来表示。而C中定义了一些字母前加"\"来表示常见的那些不能显示的ASCII字符,如\0,\t,\n等,就称为转义字符,因为后面的字符,都不是它本来的ASCII字符意思了。 转义字符 意义 阅读全文
posted @ 2022-06-11 16:38 (⊃・ᴥ・)つ 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 1. sizeof 作用:利用sizeof可以统计数据类型所占内存大小。 语法:sizeof(数据类型/变量)。 示例: #include <iostream> using namespace std; int main() { int a = 10; short b = 10; long c = 阅读全文
posted @ 2022-06-09 05:05 (⊃・ᴥ・)つ 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1.整型 1.1 short短整型 占用空间:2字节,取值范围:(-2^15~2^15-1) 1.2 int整型 占用空间:4字节,取值范围:(-2^31~2^31-1) 1.3 long长整型 占用空间:win为4字节,linux32位为4字节,64位为8字节,取值范围:(-2^31~2^31-1 阅读全文
posted @ 2022-06-09 04:41 (⊃・ᴥ・)つ 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1.变量的定义与输出 #include <iostream> using namespace std; int main() { int a = 10; cout << "a = "<< a << endl; system("pause"); return 0; } 2.常量的定义与输出 常量定义两 阅读全文
posted @ 2022-06-08 13:53 (⊃・ᴥ・)つ 阅读(22) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int main() { cout << "hello world " << endl; system("pause"); return 0; } 阅读全文
posted @ 2022-06-08 13:26 (⊃・ᴥ・)つ 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 1. Prettier的配置 安装:拓展市场搜Prettier 在设置中配置默认的格式插件 勾选退出时保存格式化文件 prettier的配置 新建一个 .prettierrc文件,在此文件中按照图片格式进行修改。相关设置选项可以查看官方网站 2. live server 在拓展市场中安装live s 阅读全文
posted @ 2022-06-05 12:39 (⊃・ᴥ・)つ 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 1.while循环 1.1 while循环结构 一个 while 语句只要指定的条件求值为真(true)就会一直执行它的语句块。一个 while 语句看起来像这样: while (condition) statement 1.2 while循环过程 如果这个条件变为假,循环里的 statement  阅读全文
posted @ 2022-06-05 12:13 (⊃・ᴥ・)つ 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 1. objects定义 const myObj = { myName: "yuxian", age: 21, } console.log(myObj); 2.Objects操作函数 2.1 直接取出元素 const myObj = { myName: "yuxian", age: 21, } co 阅读全文
posted @ 2022-05-31 06:44 (⊃・ᴥ・)つ 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 1.数组定义的两种方式 1.1 直接定义 const arr1 = ['yu', 'xian', 'cool']; console.log(arr1); 1.2 Array定义 const arr2 = new Array('really', 'nice'); console.log(arr2); 阅读全文
posted @ 2022-05-31 01:36 (⊃・ᴥ・)つ 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1.字符串转换成数字 1.1 Number() const inputYear = '1991'; console.log(Number(inputYear), inputYear); console.log(Number(inputYear) + 18); 如果转换的是无法转换成数字的字符串,结果 阅读全文
posted @ 2022-05-28 06:41 (⊃・ᴥ・)つ 阅读(19) 评论(0) 推荐(0) 编辑