C++e???????????ü??????
???????????????? ???????[ 2010/7/8 18:54:15 ] ????????
???????????C??????????????????????????e?????????к???????????????????????????????C?????????C++??????e????????????????????????????????????C++e??????????????????ɡ?
????C++e??????????????
#include < iostream.h>
#include < stdio.h>
/*
e??????
paramter??
int* pData:???????
int Count:?????С
return value??????????????
*/
int *BubbleSort (int* pData??int Count)
{
int iTemp;
????for(int i=1;i< Count;i++) {
????????for(int j=Count-1;j>=i;j--)
????????{
????????????if(pData[j]< pData[j-1])
????????????{
????????????????iTemp=pData[j-1];
????????????????pData[j-1]=pData[j];
????????????????pData[j]=iTemp;
????????????}
????????}
????}
return pData;
}
void main()
{
int a[10]={3??2??94??23??34??65??22??33??432??34};
int count=sizeof(a)/sizeof(a[0]);
int *b=BubbleSort(a??count);
//???????
????for(int i=0;i< count;i++)
????{
????????cout< < *(b+i)< < endl;
????}
}
???????????C++e??????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11