C++ //练习 18.14 假设下面的operator*声明的是嵌套的命名空间mathLib::MatrixLib的一个成员:

C++ Primer(第5版) 练习 18.14

练习 18.14 假设下面的operator*声明的是嵌套的命名空间mathLib::MatrixLib的一个成员:

cpp 复制代码
namespace mathLIb{
	namespace MatrixLib{
		class matrix { /* ... */ };
		matrix operator*(const matrix &, const matrix &);
		// ...
	}
}

请问你应该如何在全局作用域中声明该运算符?

环境:Linux Ubuntu(云服务器)
工具:vim
解释
cpp 复制代码
namespace mathLIb{
	namespace MatrixLib{
		class matrix { /* ... */ };
		matrix operator*(const matrix &, const matrix &);
		// ...
	}
}

mathLib::MatrixLib::matrix mathlib::MatrixLib::operator*(const matrix &, const matrix &);
相关推荐
叶小鸡8 分钟前
小鸡玩算法-力扣HOT100-贪心算法
算法·leetcode·贪心算法
cany100015 分钟前
C++ - 智能指针
开发语言·c++
Old Uncle Tom16 分钟前
提示词编写规范
数据库·算法
火山口车神丶19 分钟前
如何借助AI进行模块封装DIY
javascript·人工智能·算法
MegaDataFlowers24 分钟前
15.三数之和
算法
我要升天!29 分钟前
C语言连接 MySQL:libmysqlclient 获取方式详解
c语言·开发语言·数据库·mysql·adb
angushine38 分钟前
Python常用方法
开发语言·前端·python
潜创微科技44 分钟前
CH9245:双 Type‑C 转 PD 芯片方案,便携显示与拓展坞的理想选择
c语言·开发语言
Emberone1 小时前
深入理解 C++ STL string:从接口使用到底层模拟实现
c++·stl
【 】4231 小时前
pyhon相对导入
开发语言·python