3.h

来自「在matlab中实现ofdm中子载波分配,希望对大家有用!」· C头文件 代码 · 共 34 行

H
34
字号
#include<iostream.h>
#include<string.h>
#include "2.h"

void list(student*head)
{   student *p1,*p2;
    char h[9];
	char a[4];
	char b[9];
	int c;
	p1=p2=head; //排序
	while(p1)
	{
		p2=p1->next;
		while(p2)
		{

			if(p1->cs<=p2->cs)
			{
			strcpy(a,p2->name);
			strcpy(p2->name,p1->name);
			strcpy(p1->name,a);
			strcpy(b,p2->sn);
			strcpy(p2->sn,p1->sn);
			strcpy(p1->sn,b);
		    c=p2->cs;
			p2->cs=p1->cs;
			p1->cs=c;
			p2=p2->next;
			}
		}
		p1=p1->next;
	}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?