一个空的class:如class X{}
;sizeof(X)==1;sizeof为什么为1,他有一个隐晦的1
byte,那是被编译器安插进去的一个char,这使得class2的两个objects得以在内存中配置独一无二的地址:X
a,b;if(&a==&b) cerrx+=pt.x;this-> ...
分类:
编程语言 时间:
2014-05-13 19:18:24
阅读次数:
405
题目链接题意: 给出单链表的head指针, 要求去除链表中所有出现重复的元素,
如1->2->3->3->4->4->5, 返回1->2->5这题纠结了有两天,
重要的是把思路想清楚然后就可以痛苦的A掉, 不然老是会绕来绕去...我的大体思路是这样的: 使用三个指针 pre保存链表中前一个没有出现重...
分类:
其他好文 时间:
2014-05-13 18:54:51
阅读次数:
237
TriangleGiven a triangle, find the minimum path
sum from top to bottom. Each step you may move to adjacent numbers on the row
below.For example, given...
分类:
其他好文 时间:
2014-05-13 18:51:44
阅读次数:
297
If you runfsck, the filesystem check and repair
command, it might find data fragments that are not referenced anywhere in the
filesystem. In particula...
分类:
其他好文 时间:
2014-05-13 16:59:54
阅读次数:
276
The NASA Space Center, Houston, is less than
200 miles from San Antonio, Texas (the site of the ACM Finals this year). This
is the place where the ast...
分类:
其他好文 时间:
2014-05-13 16:52:45
阅读次数:
490
/*选票系统,输入每个候选人的得票结果(采用单链表存放选票,候选人编号依次123...N,且每张选票只选一人)。*//*
单链表存放选票,每个节点的data域存放该选票所选的候选人,用一个数组a统计得票结果。 */ typedef int Elemtype;typedef
struct linkno...
分类:
其他好文 时间:
2014-05-13 16:50:39
阅读次数:
377
逐步回归分析是以AIC信息统计量为准则,通过选择最小的AIC信息统计量,来达到删除或增加变量的目的。R语言中用于逐步回归分析的函数 step()
drop1() add1()#1.载入数据 首先对数据进行多元线性回归分析tdata<-data.frame( x1=c( 7, 1,11,11...
分类:
其他好文 时间:
2014-05-13 16:46:28
阅读次数:
505
(13)where字句操作符
= 等于
!= 不等于
> 大于
>= 大于等于
BETWEEN 在指定的两个值之间
例如:
找出学号是0007到0009之间的学生记录(不包括0009)?
SELECT* FROM student_info WHERE stu_id B...
分类:
数据库 时间:
2014-05-13 13:27:33
阅读次数:
368
派生表(也称为表子查询)是在外部查询的FROM子句中定义的。派生表的存在范围为定义它的外部查询,只要外部查询一结束,派生表也就不存在了。定义派生表的查询语句要定在一对圆括号内,后面跟着AS子句和派生表的名称。例:
SELECT * FROM (SELECT custid FROM Custo...
分类:
其他好文 时间:
2014-05-13 11:12:15
阅读次数:
229
1 #include 2 #include 3 4 typedef struct node { 5
int data; 6 node * next; 7 }Node, *pNode; 8 9 pNode CreateList() {10 pNode head,
p1...
分类:
其他好文 时间:
2014-05-13 10:46:30
阅读次数:
297