LiXiang666
LiXiang666
全部文章
c/c++
acm集锦(1)
Java(2)
mos(1)
PTA(1)
python(26)
Virtual Judge(6)
数据结构(13)
未归档(11)
蓝桥杯(29)
归档
标签
去牛客网
登录
/
注册
沐丶偶
For day In experience。
全部文章
/ c/c++
(共36篇)
标准输入流
#define _CRT_SECURE_NO_WARNINGS #include<iostream> using namespace std; int main() { cout << "first call" << cin.get() &l...
2019-05-28
0
289
标准输出流
#define _CRT_SECURE_NO_WARNINGS #include using namespace std; int main() { char ch = ‘a’; cout.put(ch) << endl; cout.put(‘a’).put(‘b’).put(‘c’) ...
2019-05-28
0
288
常数据成员 ,常函数
常数据成员通过初始化列表初始化,不可被修改 #define _CRT_SECURE_NO_WARNINGS #include<iostream> using namespace std; class Circle { public: Circle(double con_radius)...
2019-05-26
0
318
虚析构函数
//如果基类析构函数不是虚析构函数,派生类的析构函数不会被调用 #define _CRT_SECURE_NO_WARNINGS #include<iostream> using namespace std; class Animal { public: Animal(char *nam...
2019-05-25
0
311
虚基类
#define _CRT_SECURE_NO_WARNINGS #include<iostream> using namespace std; class Animal { public: Animal(int age) :m_nage(age) { cout <...
2019-05-25
0
419
运算符重载
+ -运算符重载 #include<iostream> using namespace std; /*常函数可以访问非const数据成员,非const成员函数可以读取常数据成员, 常成员函数不可以调用非const成员函数*/ class A { private: int x; in...
2019-05-19
0
455
容器补充
#include <iostream> #include<vector> using namespace std; int main() { vector <int> a; a.push_back(1); a.push_back(2); a.push_ba...
2019-04-25
0
277
atoi() //把字符串转换成整型数
如果该输入无法转换为该类型的值,则atoi的返回值为 0。 atoi(“abcd”);//括号内不是可以转化的类型,这种情况会返回0 #include <iostream> #include<cstdlib> using namespace std; int main() ...
2019-04-24
0
341
itoa() //将整形转换成字符串
#include <iostream> #include<cstdlib> #include<cstring> using namespace std; int main() { int n; cin>>n; char a[100]; char b[...
2019-04-24
0
331
迭代器(智能指针)
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; bool cmp(int a,int b) { return ...
2019-04-17
0
319
首页
上一页
1
2
3
4
下一页
末页