自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 通过传值和传地址输出结构体中的内容

#include #include<string.h> #include <stdio.h> using namespace std; struct student { string name; int age; string sex; }; void byValue(struct student s1) { cout << "通过传值输出结构体中的数据:" << endl; cout << "姓名为:" << s1.n

2021-04-05 17:40:40 240

原创 c++利用冒泡算法对结构体进行升序排列

#include #include using namespace std; struct hero { string name; int age; string sex; }; //对结构体进行冒泡排序的函数 void bubbleSort(struct hero heroArray[], int len) { for (int i = 0; i < len-1; i++) { for (int j = 0; j < len - i - 1; j++) { if (heroArra

2021-04-05 15:52:17 269

原创 c++ 结构体 3名教师 5名学生信息

#include #include <string.h> #include<time.h> using namespace std; struct student { string sname; int score; }; struct teacher { string tname; struct student sarry[5]; }; void allocatespace(struct teacher tarray[], int len) { //名字种子 string

2021-04-04 21:47:39 512

原创 c++输入一个一维数组进行冒泡排序

#include<string.h> #include #include<stdio.h> using namespace std; int main() { int i = 0; int j = 0; int n; cout << “请输入你定义的数组长度:” << endl; cin >>n; int *arr = new int[n]; // 指针指向首地址 cout << "请输入数组中元素:" << endl;

2021-04-04 14:47:43 1108

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除