编程语言
首页 > 编程语言> > Essential C++ Reading Notes

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.

 

标签:std,Reading,string,ctrl,Notes,stringfwd,main,mouse,Essential
来源: https://www.cnblogs.com/feliz/p/11552544.html