http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
发布时间:2011-12-02 15:15:10
#include <iostream>#include <stdexcept>#include <set>using namespace std; class Item_base {public: Item_base(string book,double f):isbn(book),price(f) {} string .........【阅读全文】
发布时间:2011-12-01 15:32:22
>>> s=['hello','world','my','name','is','Brooks.Lee']>>> for i,ss in enumerate(s): print i,ss 0 hello1 world2 my3 name4 is5 Brooks.Lee......【阅读全文】
发布时间:2011-12-01 15:16:35
Python中打印字符串时可以调用ljust(左对齐),rjust(右对齐),center(中间对齐)来输出整齐美观的字符串,使用起来非常简单,包括使用第二个参数填充(默认为空格)。看下面的例子就会明白了:<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->pr.........【阅读全文】
发布时间:2011-12-01 10:53:03
#include <iostream>//#inclde <string>#include <vector>using namespace std; class Base{public: Base(const string& str,double i):book(str),price(i) {} virtual double net_price(int n) const.........【阅读全文】