在构造体内初始化数据成员是最常见的方法。
例如:
#include
using namespace std;
class A
{
private:
int i;
string s;
public:
A(int ii,string ss){
//在构造函数体内初始化数据成员
i=ii;
s=ss;
cout<<"ctor:i="<<i<<",s="<<s<<endl;
...
分类:
编程语言 时间:
2014-06-05 01:00:02
阅读次数:
219
【题目】
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5, and A is now [1,1,2,2,3].
【题意】
给定一个有序数组,给数组去重,和Remove Duplicates from...
分类:
其他好文 时间:
2014-06-03 05:36:24
阅读次数:
219
【题目】
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the array.
【题意】
在“Search in Rotated Sorted Array”的基...
分类:
其他好文 时间:
2014-06-03 01:55:38
阅读次数:
173
界面效果
应用的权限
布局文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
andr...
分类:
移动开发 时间:
2014-06-03 00:45:02
阅读次数:
303
***************************************************************************************************************************
作者:EasyWave 时间:2014.05.31
类别:μC/OS-II-操作系统...
分类:
其他好文 时间:
2014-06-01 09:39:49
阅读次数:
356
***************************************************************************************************************************
作者:EasyWave 时间:2014.05.31...
分类:
其他好文 时间:
2014-06-01 09:13:14
阅读次数:
258
***************************************************************************************************************************
作者:EasyWave 时间:2014.05.31...
分类:
其他好文 时间:
2014-06-01 09:07:52
阅读次数:
305
布局文件:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="...
分类:
移动开发 时间:
2014-06-01 04:04:04
阅读次数:
490
【题目】
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1->1->2->3, return 2->3.
【题意】
给定一个有序链表,删出其中重复出现的值...
分类:
其他好文 时间:
2014-05-31 21:14:11
阅读次数:
333
不断找增广路,直到没有增广路,每找到一条增广路匹配数就加1 //hungary const
int X=100,Y=100;int match[Y];// initial to -1bool vis[Y];int g[X][Y];bool
dfs(int x){ for(int y=1;y<=Y;y...
分类:
其他好文 时间:
2014-05-31 20:49:41
阅读次数:
247