- 博客(16)
- 收藏
- 关注
原创 c++_primer_exercise_1717_1718
#include using std::regex; using std::sregex_iterator;#include using std::string;#include using std::cout; using std::endl;int main(){ // find the characters ei that follow a chara
2015-02-28 18:35:15 448
原创 c++_primer_exercise_1704
Exercise 17.4:/***************************************************** * IDE: VS2010 * FILE: find_book.cpp *****************************************************/#include using std::tuple;
2015-02-27 10:22:33 413
原创 c++_primer_exercise_1632_1633_1634
Exercise 16.32:The compiler examines the types of the argument that were specified using a template parameter. It automatically instantiates a version of the function with those types or values bo
2015-02-26 13:28:48 481
原创 c++_primer_exercise_1619_1620
/*********************************************** * IDE: VS2010 * FILE: print_container.h ***********************************************/#ifndef PRINT_CONTAINER_H#define PRINT_CONTAINER_H
2015-02-25 16:20:27 392
原创 c++_primer_exercise_1609_1610_1611_1612_1613_1614_1615
Exercise 16.9:function template --> Definition from which specific functions can be instantiated. A function template is defined using thetemplate keyword followed by a comma-separated list of one
2015-02-12 19:44:34 523
原创 c++_primer_exercise_1601_1604
Exercise 16.1:instantiation: class or function generated by the compiler from a template.Exercise 16.4:#include using std::vector;#include using std::begin; using std::end;#include
2015-02-10 19:11:37 478
原创 c++_primer_exercise_1531_Query
code:/*************************************************** * IDE: VS2010 * FILE: Text_query.h ***************************************************/#ifndef TEXT_QUERY_H#define TEXT_QUERY_H
2015-02-08 12:37:36 491
原创 c++_primer_exercise_1526
// by default, the base-class default constructor initializes the base-class// part of a derived object. If we want copy (or move) the base-class part,// we must explicitly use the copy (or move)
2015-02-05 19:16:53 716
原创 Name Lookup and Inheritance
Understanding how function calls are resolved is crucial to understanding inheritance in C++. Given the call p->mem()(or obj.mem()), the following fours steps happen:First determine the static
2015-02-05 10:01:45 389
原创 c++_primer_exercise_1518_1519_1520
Exercise 15.18 15.19 15.20:class Base{public: void pub_mem(); void memfcn(Base &b) { b = *this; }protected: int prot_mem;private: char priv_mem;};class Pub_drev : public Base
2015-02-04 11:26:23 948
原创 c++_primer_exercise_1515_1516
/************************************************ * IDE: VS2010 * FILE: Quote.h ************************************************/#include #include // item sold at an undiscounted price
2015-02-03 10:50:06 635
原创 c++_primer_exercise_1511_1512_1513_1514
Exercise 15.11:/****************************************************** IDE: VS2010* FILE: Quote.h*****************************************************/#ifndef QUOTE_H#define QUOTE_H
2015-02-02 19:23:29 577
原创 c++_primer_exercise_1504_1505_1506_1507
Exercise 15.4:(a) incorrect. it is impossible to derive a class from itself. in other words, a class must be defined, not just declared, before we can use it as a base class.Exercise 15.5_15.6
2015-02-02 10:48:15 510
原创 c++_primer_exercise_1501
Exercise 15.1:Member function that defines type-specific behavior. Calls to a virtual made through a reference or pointer are resolved at run time, based on the type of the object to which the ref
2015-02-01 13:18:42 328
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人