C/C++
zs199112zs
这个作者很懒,什么都没留下…
展开
-
learn from Mobimsg
1. JTextArea的换行函数是setLineWrap(true),设置该函数即可实现换行的应用~2.http://www.isstudy.com/java/2005.html, 关于JComboBox的使用,详细的讲解了listener。对内容的管理可以用一个vector来进行管理,可以直接vector.add()函数就可以添加Item对选择内容的整理,可以用itemlisten原创 2012-10-24 16:27:08 · 244 阅读 · 0 评论 -
Career Cup: Map, 发帖水王
http://www.careercup.com/question?id=14099679Design an algorithm that, given a list of n elements in an array, finds all the elements that appear more than n/3 times in the list. The algorithm shoul原创 2012-12-11 23:23:29 · 316 阅读 · 0 评论 -
C++虚函数
1. 子类在构造时调用基类的构造函数#includeusing namespace std;class base{public: base() { cout<<"Base Constract"<<endl; } virtual void fun() { cout<<"Base call"<<endl; } virtual void anfun() { co原创 2012-12-04 13:11:28 · 180 阅读 · 0 评论 -
KMP source code
先把代码记下来,以后有时间再把分析补上/* *String.h */class String{private: char * str; int size;public: String(char * str); int getsize(); char * getstr(); ~String(); void CptPfFunc(int * prefix); void原创 2012-12-15 22:28:37 · 319 阅读 · 0 评论 -
c++ distance 给我挖了个坑
http://stackoverflow.com/questions/4217733/distance-calculation-error-in-cnamespace std中已经定义过distance函数,所以自己在定义的时候总是会出现异常。我的代码#include#includeusing namespace std;int main(){ int tmp=0; i原创 2013-04-13 16:17:33 · 1683 阅读 · 0 评论