C++学习笔记(三)之函数库

1.标准库函数 begin end

  • begin 返回数组首地址
  • end   返回数组尾地址

2.const 

  • 在声明变量时对变量限制为只读,不允许修改
  • const int i = 5;
  • 单个const作用域为该文件中,通过加extern 作用于所有文件中
    extern const int i = 5;        //作用于所有文件
     

3. 类型声明

  1. typedef
    1 typedef int test;        //test是int的别名
    2 typedef test  otest,*p;        //otest是test的别名,p是int*的别名
  2. 别名申明 

    1 using test=int;        //test是int类型别名
      

     

原文地址:https://www.cnblogs.com/mokero/p/6645465.html