Essential C++ Reading Notes

Chapter1

P6, 1.2 Why //#include<string> we still can use "string user_name"?

-->ctrl+left mouse on the string of "string user_name", you can find string defined in "stringfwd.h"

     ctrl+left mouse on std of "using namespace std", you can find std include "stringfwd.h"

Note1: cout<<"enter...\n";  equal to cout<<"endter..."<<endl;

P7, 1.3 if change main to my_main(), what will happen?

-->ld error, undefined 'main' in function '_start'

Note2: don't forget "constructor syntax" for initialization, example: int age(10); it works not only for class.

 

上一篇:《Essential C++》系列笔记之第一章(C++编程基础)之第三节(撰写表达式)


下一篇:FPGA在其他领域的应用(四)