摘要: atoi的使用 头文件:#include <stdlib.h> atoi() 函数用来将字符串转换成整数(int),其原型为:int atoi (const char * str); **【函数说明】**atoi() 函数会扫描参数 str 字符串,跳过前面的空白字符(例如空格,tab缩进等,可以通 阅读全文
posted @ 2022-03-18 18:12 W-forever 阅读(443) 评论(0) 推荐(0)
摘要: 字符串的查询-strchr char* strchr(const char* str, int c); 参数说明: str:被查找的字符串。 c:要查找的字符。 strchr() 函数会依次检索字符串 str 中的每一个字符,直到遇见字符 c,或者到达字符串末尾(遇见\0)。 返回值:返回在字符串 阅读全文
posted @ 2022-03-18 17:59 W-forever 阅读(117) 评论(0) 推荐(0)
摘要: 实验一:缺失值分析 实验内容 生成含有缺失值的数据 对数据集进行缺失值分析 使用删除缺失值的方法处理数据集 点击查看代码 #导入pandas,numpy库,生成一个含有缺失值数据的数据集 import pandas as pd import numpy as np data = pd.DataFra 阅读全文
posted @ 2022-03-18 17:54 W-forever 阅读(138) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<functional> #include<vector> #include<string> #include<map> #include<set> using namespace std; //两个主要的 阅读全文
posted @ 2022-03-17 17:38 W-forever 阅读(34) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<numeric> #include<vector> #include<string> #include<queue> #include <functional> #include<list> #inclu 阅读全文
posted @ 2022-03-16 21:11 W-forever 阅读(52) 评论(0) 推荐(0)
摘要: #include<iostream> #include<vector> #include<deque> #include<list> #include<forward_list> #include<array> #include<string> #include<stack> using names 阅读全文
posted @ 2022-03-15 17:42 W-forever 阅读(19) 评论(0) 推荐(0)
摘要: #include <iostream> #include<vector> #include<string> using namespace std; //运算符重载 class Person { public: Person() {}; Person(int a, int b) { this->a 阅读全文
posted @ 2022-03-15 14:43 W-forever 阅读(31) 评论(0) 推荐(0)
摘要: # include<iostream> #include<string> #include<fstream> #include<vector> using namespace std; //io类 void test01() { //io类包含的头文件有iostream istream ostrea 阅读全文
posted @ 2022-03-14 23:42 W-forever 阅读(68) 评论(0) 推荐(0)
摘要: #include<iostream> #include<string> #include<vector> using namespace std; //改进使用的sales_data类 /* 1.成员函数的声明必须在类的内部,它的定义既可以在类的内部也可以在类的外部 2.定义在类内部的函数是隐式的i 阅读全文
posted @ 2022-03-13 09:40 W-forever 阅读(78) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; //局部 静态对象 size_t count_calls() { static size_t ctr = 0; return ++ctr; } //使用引用避免拷贝 bool isShorter(const string 阅读全文
posted @ 2022-03-09 17:30 W-forever 阅读(37) 评论(0) 推荐(0)