码迷,mamicode.com
首页 >  
搜索关键字:public void __cdecl    ( 122950个结果
如何理解java的引用传递
1. 数组的引用传递public class TestArray { public static void changeAry1(int[] ary){ int[] ary1 = {9,9,9}; ary = ary1; } public stat...
分类:编程语言   时间:2014-05-08 09:21:18    阅读次数:370
HDU 1011 Starship Troopers(树形dp)
OJ题目:click here~~ 树上的01背包 const int maxn = 102; int val[maxn]; int w[maxn]; vector g[maxn]; int dp[maxn][maxn]; int n , m ; void dfs(int u , int father){ int v , i , j , k; for(i = w[u];i...
分类:其他好文   时间:2014-05-08 05:09:28    阅读次数:323
十一周 项目4 类族的设计
#include #include using namespace std; class Point { public: Point(double x=0,double y=0); void setPoint(double,double); double getx() { return x; } double gety() ...
分类:其他好文   时间:2014-05-08 04:44:47    阅读次数:237
File类的基本操作之读出全部文件夹路径
package org.mark.file; import java.io.File; /** * File类的基本操作之读出全部文件夹路径 * 如果给定一个目录,要求将此目录中的全部文件都列出来 * 使用递归 */ public class TestChare { /** * @param args */ public static void main(String[]...
分类:其他好文   时间:2014-05-08 03:53:29    阅读次数:259
链队列的C++实现
#include using namespace std; //节点类 template struct QNode { T data; QNode *next; }; //队列类 template struct LinkList { QNode * front; QNode * rear; size_t size; }; //构造一个空队列 template void InitQueu...
分类:编程语言   时间:2014-05-08 03:48:19    阅读次数:346
定积分解法
定义了一个基类的指针,通过基类操纵派生类,初始化派生类对象。。粤粤大神教我的。。嘻嘻。。。 代码如下: #include #include #include using namespace std; void menu1() // 选择积分函数功能菜单 { cout<<" 请 选 择 被 积 函 数"<<endl; cout<<"\n...
分类:其他好文   时间:2014-05-08 03:46:23    阅读次数:289
十一周 项目4 类族的设计 完整版
#include #include using namespace std; class Point { public: Point(double x=0,double y=0); void setPoint(double,double); double getx() { return x; } double gety() ...
分类:其他好文   时间:2014-05-08 03:42:17    阅读次数:273
浅谈Iterator iterable
首先附上这两个接口JDK中的定义:packagejava.lang;importjava.langpublicinterfaceIterable<T>{Iterator<T>iterator();}packagejava.util;publicinterfaceIterator<E>{booleanhasNext();Enext();voidremove();}首先你会看到这两个接口在不同的包中,Iterabl..
分类:其他好文   时间:2014-05-08 03:36:04    阅读次数:267
ListView嵌套ListView优化
在做业务时候,一个ListView显示多种数据类型,我们想到的方法是ListView在嵌套一个ListView,对于子ListView 占父ListView的一行,就解决了问题,但是这样的逻辑是不是有点奇怪呢? 第一,父ListView的长度size需要加1,因为增加了一行放子listView public int getCount() { retur...
分类:其他好文   时间:2014-05-08 01:42:10    阅读次数:316
Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for binary tree * public class TreeN...
分类:其他好文   时间:2014-05-08 00:51:46    阅读次数:430
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!