摘要: 先看看thin和oci的url写法上的区别: jdbc:oracle:thin:@server ip: service jdbc:oracle:oci:@service 看来oci的还更加简洁,ip可以省掉不写了。 官方对其解释: Oracle provides four different types of JDBC drivers, for use in different deploymen... 阅读全文
posted @ 2010-02-23 17:31 岁月流年 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 35,15,+,80,70,-,*,20,///后缀表达方式(((35+15)*(80-70))/20)=25 //中缀表达方式 /,*,+,35,15,-,80,70, 20 //前缀表达方式 人们习惯的运算方式是中缀表达式。而碰到前缀,后缀方式。。迷茫其实仅仅是一种表达式子的方式而已(不被你习惯的方式)一个中缀式到其他式子的转换方法~~这里我给出一个中缀表达式~a+b*c-(d+e)第一步:按... 阅读全文
posted @ 2010-02-22 09:55 岁月流年 阅读(1237) 评论(2) 推荐(0) 编辑
摘要: (1)C++ 不允许在一个构造函数中调用另外一个构造函数(称为委派构造函数调用),而 C# 则允许。例如:  C++:  struct Point {  public:  int X, Y;  Point(int x, int y);  Point(Point pt) : Point(pt.X, pt.Y) { } // 错误,C++ 不允许  };   C#:  struct Point {  ... 阅读全文
posted @ 2009-12-04 22:46 岁月流年 阅读(491) 评论(0) 推荐(0) 编辑
摘要: A: 函数声明:int find(int* a); 函数调用:int b = 1; int n = find(&b); 这样调用时,实际上是进行了:int* a = &b,创建了一个新的指向b的整型指针a作为find函数范围内的局部变量。 B: 函数声明:int find(int& a); 函数调用:int b = 1; int n = find(b); 这样调用时,实际上... 阅读全文
posted @ 2009-09-24 14:27 岁月流年 阅读(14873) 评论(0) 推荐(2) 编辑
摘要: printf("A\n"); cout<<"B\n"; printf("C\n"); the ouputis : A C Bnot: A B Cwhy? answer: 1. you shouldn't mix "printf()" and "cout" in the same program because C stdio and C++ iostre... 阅读全文
posted @ 2009-09-22 23:52 岁月流年 阅读(857) 评论(0) 推荐(0) 编辑
摘要: malloc用法需要包含头文件:#include 'stdlib.h'函数声明(函数原型):void *malloc(int size);说明:malloc 向系统申请分配指定size个字节的内存空间。返回类型是 void* 类型。void* 表示未确定类型的指针。C,C++规定,void* 类型可以强制转换为任何其它类型的指针。从函数声明上可以看出。malloc 和 new 至少有两个不同: n... 阅读全文
posted @ 2009-09-19 23:21 岁月流年 阅读(4058) 评论(0) 推荐(0) 编辑