
C++
Geo_ffrey
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++笔记之零碎点
1,测试cin.ignore()的作用,用于去除缓冲区的残留数据 #include <iostream> int main() { char buff[20]; char buff1[20]; std::cin >> buff1; std::cin.ignore(7, '\n'); // 通常把获取前n个字符写的很大,去...原创 2018-10-08 11:23:00 · 294 阅读 · 0 评论 -
c++字符串string的操作
1.字符串的声明 #include <iostream> #include <cstring> #include <string> using namespace std; int main() { //直接赋值 string test;//定义了一个空字符串str test = "test_the_string"; c...原创 2018-10-18 12:24:15 · 306 阅读 · 0 评论 -
C++学习之 —— 输入输出
案例:输入任意空格和数字,输出其中的数字之和。 #include <iostream> using namespace std; int main() { int sum = 0; cout << "Please Input space or number:"; int i = 0; while( cin >> ...原创 2018-09-29 22:06:38 · 274 阅读 · 0 评论 -
c++基本数据类型及其取值范围
#include<iostream> #include<string> #include <limits> using namespace std; int main() { cout << "type: \t\t\t" << "************size**************" <&原创 2018-10-10 16:52:27 · 1645 阅读 · 0 评论