2019年3月1日

c/c++ 中的重要函数

摘要: 1,strtod: 函数原型: 1 #include <cstdlib> 2 double strtod(const char *nptr, char **endptr); 名称含义: strtod(将字符串转换成浮点数) 相关函数: strtof(float),strtol(long int),s 阅读全文

posted @ 2019-03-01 15:24 爱笑的张飞 阅读(365) 评论(0) 推荐(0)

2019年2月26日

c++中的类(class)-----笔记(类简介)

摘要: 1, class 和 struct 都可以定义一个类,区别是两者在所支持的 默认信息隐藏方式不同:c++ 中默认为 private 类型,而 struct 中默认为 public 类型。 2,类的私有成员具有 类范围 性质,仅能由类的成员函数访问。 3,类成员函数的定义有两种方式:(a)在类声明的时 阅读全文

posted @ 2019-02-26 18:59 爱笑的张飞 阅读(1039) 评论(0) 推荐(0)

2019年2月25日

Error:stray '\243' in program

摘要: c++ 程序出现 Error:stray '\243' in program 错误 错误情况: 错误原因: 有不标准的 ASCII 字符出现,一般是中英文问题,比如 ;or ; , or ,等 解决方法: 将程序中的 : > :(中文符号改为英文符号) 阅读全文

posted @ 2019-02-25 21:47 爱笑的张飞 阅读(7900) 评论(0) 推荐(1)

C library:<cctype>(ctype.h)

摘要: 1, isalnum(): check whether c is either a decimal digit or an uppercase or lowercase letter. 2, isalpha 3, isblank(c++11) 4, iscntrl : check whether c 阅读全文

posted @ 2019-02-25 20:05 爱笑的张飞 阅读(469) 评论(0) 推荐(0)

2019年2月21日

leetcode 链表类型题总结

摘要: 链表测试框架示例: 1 // leetcodeList.cpp : 定义控制台应用程序的入口点。vs2013 测试通过 2 // 3 4 #include "stdafx.h" 5 #include <Windows.h> 6 #include <iostream> 7 8 using namesp 阅读全文

posted @ 2019-02-21 16:50 爱笑的张飞 阅读(302) 评论(0) 推荐(0)

VS2013 warning C4018 "<” 有符号/无符号不匹配

摘要: 1, VS2013 warning C4018 "<” 有符号/无符号不匹配" 警告 出错代码: void show(const vector<int>& nums){ for (int i = 0; i < nums.size(); i++){ cout << '\t' << nums[i]; } 阅读全文

posted @ 2019-02-21 12:56 爱笑的张飞 阅读(2541) 评论(0) 推荐(1)

2019年2月20日

激活 pycharm

摘要: step1: 在本地 hosts 文件增加一行,windows 路径一般为:C:\Windows\System32\drivers\etc step2: 输入激活码 7SPIY8PDT7-eyJsaWNlbnNlSWQiOiI3U1BJWThQRFQ3IiwibGljZW5zZWVOYW1lIjoi 阅读全文

posted @ 2019-02-20 17:46 爱笑的张飞 阅读(240) 评论(0) 推荐(0)

2019年2月18日

leetcode 数组类型题总结

摘要: 1,removeDuplicates(I) 1 int removeDuplicatesI(vector<int>& nums){ // 重新组织数组,同 removeDuplicates2IV 2 int index = 0; 3 for(int i=0;i<nums.size();++i){ 4 阅读全文

posted @ 2019-02-18 20:27 爱笑的张飞 阅读(667) 评论(0) 推荐(0)

leetcode 数组类型题

摘要: 题目参考教材:https://github.com/soulmachine/leetcode(leetcode-cpp.pdf) 阅读全文

posted @ 2019-02-18 14:34 爱笑的张飞 阅读(270) 评论(0) 推荐(0)

2019年1月31日

STL::string

摘要: Iterators begin: end: rbegin: rend: cbegin: cend: crbegin: crend: Capacity size: length: max_size: resize: capacity: 返回实际分配的存储空间的大小,一般大于等于 size 。这样能优化 阅读全文

posted @ 2019-01-31 23:58 爱笑的张飞 阅读(290) 评论(0) 推荐(0)

导航