当前位置:网站首页>Definition and use of C language namespace
Definition and use of C language namespace
2022-07-26 10:50:00 【aLLLiyyy】
as everyone knows std Is a namespace , It can define a series of constants , Variables and functions , The simplest namespace is defined as follows :
namespace Output {
int i = 10;
const int con = 15;
void printStr() {
printf("hello");
}
}
using namespace Output;
It defines a Output The namespace of , There is a constant in it , Variable , function . If we want to use them , It can be like this
Output::printStr()
You can call this function directly . Empathy ,std::bind() It's also a function , Only this function is defined in a namespace .
边栏推荐
- RT-Thread 学习笔记(八)---开启基于SPI Flash的elmfat文件系统(下)
- 对面向抽象编程的理解
- RT thread learning notes (I) -- configure RT thread development environment
- C语言鹏哥20210812C语言函数
- c结构体中定义的成员指针赋值与结构体指针作为成员函数参数的使用
- 2021-08-13 learn C language with pengge - array
- RT-Thread 学习笔记(七)---开启基于SPI Flash的elmfat文件系统(中)
- 使用定位实现左中右布局,中间内容自适应
- 访问权限——private,public,protected
- Build ARM embedded development environment
猜你喜欢
![[leetcode daily question 2021/2/18] [detailed explanation] minimum number of turns of 995. K continuous bits](/img/de/62fca587cde95110c2a967ca93eea5.png)
[leetcode daily question 2021/2/18] [detailed explanation] minimum number of turns of 995. K continuous bits

【小程序】onReachBottom 事件为什么不能触发 ?(一秒搞定)
![[leetcode daily question 2021/4/23]368. Maximum divisible subset](/img/0b/32ca862963c842a93f79eaac94fb98.png)
[leetcode daily question 2021/4/23]368. Maximum divisible subset

$router和$route的区别

Successfully transplanted stemwin v5.22 on Shenzhou IV development board

IAR sprintf 浮点 在UCOS 总格式化成0.0的问题

35. 搜索插入位置

Flutter编译报错 version of NDK matched the requested version 21.0.6113669. Versions available locally: 2

349. 两个数组的交集

Bash shell学习笔记(六)
随机推荐
Happens-Before原则深入解读
鹏哥C语言20210811程序结构作业
mysql20210906
很多人都不清楚自己找的是Kanban软件还是看板软件
RT-Thread 学习笔记(七)---开启基于SPI Flash的elmfat文件系统(中)
MySQL quicklearn-2021-09-01
SQL Server 之Sql语句创建数据库
list升序和降序
Pengge C language sixth class
Sword finger offer (twenty): stack containing min function
0x00007ffd977c04a8 (qt5sqld.dll) (in a.exe): 0xc0000005: an access violation occurred when reading position 0x0000000000000010
访问权限——private,public,protected
【小程序】onReachBottom 事件为什么不能触发 ?(一秒搞定)
20210807 1 c language program structure
[leetcode daily question 2021/8/30]528. Choose randomly by weight [medium]
Bash shell学习笔记(六)
Sql Server之查询总结
[leetcode daily question 2021/2/14]765. Lovers hold hands
二叉树的遍历 递归+迭代
shell 脚本 失败自动重复执行