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 &);
相关推荐
Learn Beyond Limits几秒前
Clustering vs Classification|聚类vs分类
人工智能·算法·机器学习·ai·分类·数据挖掘·聚类
chao1898443 分钟前
遗传算法与粒子群算法优化BP提高分类效果
算法·分类·数据挖掘
ScilogyHunter5 分钟前
卫星姿态控制模式全解析:从基准到任务的体系化分类
算法·分类
ftpeak8 分钟前
Rust 嵌入式开发的经验之谈
开发语言·后端·rust
lly20240613 分钟前
Node.js 多进程
开发语言
曹绍华1 小时前
kotlin扩展函数是如何实现的
android·开发语言·kotlin
上去我就QWER1 小时前
Qt中的QShortcut:高效键盘快捷方式开发指南
开发语言·c++·qt
gihigo19982 小时前
MATLAB数值分析方程求解方法详解
算法·机器学习·matlab
QT 小鲜肉2 小时前
【C++基础与提高】第二章:C++数据类型系统——构建程序的基础砖石
开发语言·c++·笔记
lsx2024063 小时前
HTML5 新元素
开发语言