c/c++
文章平均质量分 76
xcai
现在不够厉害,以后非常厉害...!
展开
-
数组初始化
函数体外定义的数组: 元素初始化为0函数体内定义的内置数组: 不提供初始化函数体内或者外面的自定义类型: 自动调用默认构造函数初始化#include int ioutArr[5];char coutArr[5];int main(){ int iinArr[5]; char cinArr[5]; system("pause");原创 2012-01-16 10:45:42 · 289 阅读 · 0 评论 -
循环队列(数据结构)
一年前学的数据结构都忘得差不多了,想重温一下....#include #include #include #define QueueSize 5#define OK 1typedef char DataType;typedef int Status;typedef struct Queue{ DataType data[QueueSize]; int原创 2012-02-24 20:56:57 · 498 阅读 · 0 评论 -
大数运算
#include #include #include using namespace std;int main(){ string str1, str2, str; int length1=0, length2=0,carryBit=0; cin >> str1 >> str2; length1 = str1.length(); length2 = st原创 2012-01-14 17:08:18 · 350 阅读 · 0 评论 -
radixSort 基数排序算法实现
基数排序特点: 1)基数排序的时间是线性的(即 O(n) )。 2)基数排序所需的辅助存储空间为 O(n+rd)。 #include 3)基数排序是稳定的。#include #include #include #include void radixSort(int data[], const int原创 2012-04-25 16:12:15 · 618 阅读 · 0 评论