# include
# include
# include
using namespace std;
struct node
{
int pos;
int d;
int num;
friend bool operator n2.d;//仍的距离从小到大
return...
分类:
其他好文 时间:
2014-07-21 11:43:44
阅读次数:
180
# include
# include
# include
using namespace std;
struct node
{
int y;
int val;
int num;
friend bool operatorn2.num;//从小到大
return...
分类:
其他好文 时间:
2014-07-21 11:36:44
阅读次数:
203
#include
#include
int main()
{
int num1,num2;
int *num1_p=&num1,*num2_p=&num2,*pointer;
printf("Input the first number:");
scanf("%d",num1_p);
printf("Input the second num...
分类:
其他好文 时间:
2014-07-21 11:14:14
阅读次数:
180
//algorithm.henum SWAP_TYPE{MEMORY, COMPLEX};struct SIntArray{ int *pData; int num; SIntArray():pData(NULL),num(0){} void Clear(){delete ...
分类:
其他好文 时间:
2014-07-21 09:38:33
阅读次数:
263
一、原型:extern void *malloc(unsigned int num_bytes);头文件:#include 或 #include (注意:alloc.h 与 malloc.h 的内容是全然一致的。)功能:分配长度为num_bytes字节的内存块说明:假设分配成功则返回指向被分配内.....
分类:
其他好文 时间:
2014-07-21 08:35:50
阅读次数:
244
qsort函数应用大全(转)2006-11-25 21:17七种qsort排序方法一、对int类型数组排序int num[100];Sample:int cmp ( const void *a , const void *b ){return *(int *)a - *(int *)b;}qsort...
分类:
其他好文 时间:
2014-07-21 08:27:14
阅读次数:
213
有一个函数如下: 1 public static void SortNum(int numA, int numB) 2 { 3 int x = 0; 4 int y = 0; 5 while (num...
分类:
其他好文 时间:
2014-07-21 08:14:45
阅读次数:
726
函数内部的属性:arguments 和this是函数内部的两个特殊对象arguments:function recursion(num){ if(numfunction box(num1,num2){ return num1+num2;}//可以使用这种方式将sum函数转换成 box方法...
分类:
Web程序 时间:
2014-07-21 08:03:31
阅读次数:
260
6,给一个不多于5位的正整数,要求:一、求它是几位数,二、逆序打印出各位数字。
//intnum=0,temp=0,i=0;
//printf("输入一位数字:");
//scanf("%d",&num);
//while(num>0){
//temp=num%10;
//printf("%d",temp);
//i++;
//num=num/10;
//}
//printf("\n%d位数",i);
分类:
编程语言 时间:
2014-07-21 07:21:35
阅读次数:
252
简单的二叉树的先根遍历模板的应用
class Solution:
# @param root, a tree node
# @return an integer
def hehe(self, num, root):
#再原来的基础上*10,再加上当前的root.val
num = num * 10 + root.val
...
分类:
其他好文 时间:
2014-07-20 22:45:33
阅读次数:
299