摘要: ##### vector的定义 ```#include <iostream>#include <string>#include <vector>using namespace std;struct stu{ int age;};class xx{ string s;};void vectorDefi 阅读全文
posted @ 2019-06-07 23:42 SteveYu 阅读(556) 评论(0) 推荐(0) 编辑
摘要: **本篇博文参考视频见我上一篇博文的第一行**### 类和对象的声明- 类的声明```class People{ int a; void fun(){ cout<<"fun"<<endl; }};```**注意:类结束一定要加分号,否则会报void不能有返回值的错误** - 对象的声明```Peop 阅读全文
posted @ 2019-06-07 23:42 SteveYu 阅读(304) 评论(0) 推荐(0) 编辑
摘要: # 1.string的用法- string在&lt;iostream>的头中就有,但是还是得用&lt;string>的头 ##### 构造函数- str(const char* ch) 直接赋值- str(size_t n,char ch) 赋值n个ch字符- str(char* ch,size_t 阅读全文
posted @ 2019-06-07 23:39 SteveYu 阅读(1566) 评论(0) 推荐(0) 编辑
摘要: **参考bilibili视频av29504365** ### 一段简单的程序Hello World```#include <iostream>using namespace std;int main(){ cout<<"hello world"<<endl; system("pause"); ret 阅读全文
posted @ 2019-06-07 23:38 SteveYu 阅读(481) 评论(0) 推荐(0) 编辑
摘要: # 这一章节全部是C语言的内容# 数据类型提高**注意**1.数组作为形参会退化为指针(验证,传参后用sizeof进行打印,可以看出打印出数组的字节为一字节)2.形参在函数上和函数内是一样的,只不过对外开放 # 内存四区 ##### 数组和数组元素指针```void main(){ int a;// 阅读全文
posted @ 2019-06-07 23:37 SteveYu 阅读(364) 评论(0) 推荐(0) 编辑