C++笔记总结
C++算法编码过程中一些问题或者需求的解决办法
Runa乀丛雨様
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++取整,四舍五入
将浮点数取整或者四舍五入的数据处理情况经常见到,下面做一下总结注意函数取整返回值均为double型,在用printf输出时应注意头文件#include#include<iostream>#include<math.h>using namespace std;int main(){ double a=2.5; cout<<ceil(...转载 2020-03-06 09:50:16 · 2704 阅读 · 0 评论 -
C++中的字符串(String)和数值转换
『写在前边』因为写PAT总是遇到字符串(主要是String)和数值之间的转化,所以整理一下以便好复习。『String类型的字符串』这里数值和字符串相互转换的例子,使用的是stringst...转载 2020-03-05 21:34:12 · 799 阅读 · 0 评论 -
C++中substr函数的用法
原地址:https://www.cnblogs.com/xzxl/p/7243490.html 1 <p>2</p> <p>3</p...转载 2020-03-05 21:29:57 · 234 阅读 · 0 评论 -
cin.get() 和 cin.peek() 的理解
cin.get()用法1: cin.get(字符...转载 2020-03-05 17:45:36 · 577 阅读 · 0 评论 -
VS 2019 编译文件时错误 找不到头文件
出现如下编译错误:1.打开Visual Studio Installer,点击修改,点击单个组件,在编译器、生成工具和运行时中找到Windows 10SDK1...转载 2020-03-04 17:30:55 · 4096 阅读 · 0 评论 -
VS2012配置astyle格式化代码
1、工具-》扩展和更新,搜astyle插件,下载安装重启,当前是2.0版本。2、工具-》选项-》AStyle Formatter-》Edit,填入下面的,点击save,确定。–style=allman --indent=spaces=4 --indent-switches --indent-cases --indent-namespaces --break-blocks --pad-oper ...转载 2020-03-03 09:38:59 · 329 阅读 · 0 评论
分享