- 博客(10)
- 收藏
- 关注
原创 !!!Chapter 12 Classes (12.1 ~ 12.3)
12.1 Class Definitions and Declarations12.1.1 Class Definitions: A RecapMost fundamentally, a class defines a new type and a new scope.Class MembersEach class defines zero or more members.
2012-10-29 12:23:33 544
原创 !!!C++ -> C
Create a new variablewe can create a new variable by the type specifier + the initializer: int main(){ cout << string("abcdefd") << endl; //output is abcdefd}int main(){ string a;
2012-10-29 04:04:01 269
原创 !!!Chapter 11 Generic Algorithms
11.1 OverviewThe find function takes two iterators and a value. If it finds the value, it will return an iterator pointing to that value; otherwise, it will return the second iterator (the second ar
2012-10-23 10:26:40 459
原创 !!!Chapter 10 Associative Containers
Associative containers support efficient lookup and retrieval by a key.The two primary associative-container types are map and set.The elements in a map are key-value pairs: The key serves as an
2012-10-17 00:03:26 469
转载 !!!Interviewer
硅谷一流的互联网公司大都有类似的面试过程。首先是一到两轮的电话面试,通过后到公司现场面试。 电话面试问的大都是算法问题, 对方和应聘者约好时间,在 collabedit.com 上,对方出个题,应聘者直接写程序,对方通过观察应聘者的速度和准确度来判断是否是个优秀的程序员。 如果过不了这关,就直接刷下来。 这种做法有其争议之处,当初因为Google 普遍使用,后来许多人来到Facebook 和L
2012-10-14 13:34:30 528
原创 !!!Chapter 9 Sequential Containers (9.4 ~ 9.7)
9.4 How a vector GrowsTo support fast random access, vector elements are stored contiguously - each element is adjacent to the previous element. (so that index can work)When there is no space for
2012-10-11 02:51:38 366
转载 !!!C++输入输出进制、数据宽度与对齐、精度、取整
1、数的进制默认进制:默认状态下,数据按十进制输入输出。如果要求按八进制或十六进制输入输出,在cin或cout中必须指明相应的数据形式,oct为八进制,hex为十六进制,dec为十进制。举例:int i, j, k, l;coutcin>>oct>>i;//输入为八进制数cin>>hex>>j;//输入为十六进制数cin>>k;//输入仍为十六进制数ci
2012-10-09 04:30:51 1208
原创 !!!Chapter 9 Sequential Containers (9.1 ~ 9.3)
A container holds a collection of objects of a specified type. The library vector type is a sequential container. The order of elements in a sequential container is independent of the value of the e
2012-10-05 23:13:17 578
原创 !!!100 C++ Questions (I)
Red: could not solveOrange: have better answer画图绘制余弦曲线my code:#include #include #include using std::cin;using std::cout;using std::endl;using std::vector;int main(){ int a[41]
2012-10-05 03:25:14 690
原创 !!!Chapter 8 The IO Library
8.1 An Object-Oriented LibraryTo support or using different kinds of devices and different sized character streams, the library usesinheritance to define a set of object-oriented classes.When on
2012-10-02 05:28:52 401
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人