摘要: /************** header file ****************/// 1, define guards to prevent multiple inclusion#ifndef PROJECT_PATH_FILE_H_#define PROJECT_PATH_FILE_H_//......#endif // PROJECT_PATH_FILE_H_// 2, minimize the header file you need to include in your header file// use forward declaration class File;//bu 阅读全文
posted @ 2011-04-24 10:35 love && peace 阅读(358) 评论(0) 推荐(0) 编辑
摘要: chapter 5object-oriented programming2 primary characteristics of object-oriented programming are Inheritance and PolymorphismInheritance: allows us to group classes into families of related types, allowing for the sharing of common operations and data.Polymorphism: allows us to program these familie 阅读全文
posted @ 2011-01-16 06:06 love && peace 阅读(146) 评论(0) 推荐(0) 编辑
摘要: poj 2676DescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The other cells are empty. The goal is to fill the empty cells with decimal digits from 1 阅读全文
posted @ 2011-01-12 12:27 love && peace 阅读(248) 评论(0) 推荐(0) 编辑
摘要: chapter 4 object-based programming1,define a class  all members functions must be declared within the class definition. if defined within a body of the class, the member function is automatically treated as being inline  the class definition and the inline member functions are typically placed in a 阅读全文
posted @ 2011-01-10 12:33 love && peace 阅读(246) 评论(0) 推荐(0) 编辑
摘要: chapter 3 generic(普通,共有的) programming1, arithmetic of pointers :the use of template, note that find return a pointerin function, *(array+2) means adds 2 of the size of the elemType being addressed.2, iteratorsuse generic algorithms #includealgorithm3, sequential containers : vector , list , deque 阅读全文
posted @ 2011-01-07 15:42 love && peace 阅读(190) 评论(0) 推荐(0) 编辑
摘要: poj 2488 knight's journeyBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeyaround the world. Whenever a knight moves, it is two squares in one direction and one square perpendicular to this. The world of a knight is the 阅读全文
posted @ 2011-01-05 01:41 love && peace 阅读(208) 评论(0) 推荐(0) 编辑
摘要: poj 2251InputThe input consists of a number of dungeons. Each dungeon description starts with a line containing three integers L, R and C (all limited to 30 in size).L is the number of levels making up the dungeon.R and C are the number of rows and columns making up the plan of each level.Then there 阅读全文
posted @ 2011-01-05 00:42 love && peace 阅读(250) 评论(0) 推荐(0) 编辑
摘要: distributes system is a capstone course of NYU CS master program, which I pick in the first semester. the course web site is http://www.news.cs.nyu.edu/~jinyang/fa10/this course includes several papers for reading and 8 labs, among which the labs are quite challenging.the overview shows as follows.- 阅读全文
posted @ 2011-01-03 12:16 love && peace 阅读(279) 评论(0) 推荐(0) 编辑
摘要: what makes me amused joyful is I use emacs coding this algorithm..:)although i am not proficient in it at all.besides, today I installed aqumacs in place of the built-in emacs of Mac. thereby(thus) reviewed the bash command and the profile .bash_profile---------------------------------------------- 阅读全文
posted @ 2010-12-28 18:14 love && peace 阅读(164) 评论(0) 推荐(0) 编辑
摘要: poj 1125 Stockbroker GrapevineInputYour program will input data for different sets of stockbrokers. Each set starts with a line with the number of stockbrokers. Following this is a line for each stockbroker which contains the number of people who they have contact with, who these people are, and t 阅读全文
posted @ 2010-12-27 10:38 love && peace 阅读(144) 评论(0) 推荐(0) 编辑