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 &);
相关推荐
GIS小天13 分钟前
AI+预测3D新模型百十个定位预测+胆码预测+去和尾2025年8月25日第170弹
人工智能·算法·机器学习·彩票
PAK向日葵1 小时前
【算法导论】XM 0823 笔试题解
算法·面试
岁月栖迟1 小时前
leetcode 49. 字母异位词分组
windows·算法·leetcode
Asmalin1 小时前
【代码随想录day 21】 力扣 77. 组合
算法·leetcode·职场和发展
XH华2 小时前
C语言第十一章内存在数据中的存储
c语言·开发语言
AndrewHZ4 小时前
【python与生活】如何用Python写一个简单的自动整理文件的脚本?
开发语言·python·生活·脚本·文件整理
拉法豆粉4 小时前
在压力测试中如何确定合适的并发用户数?
java·开发语言
枯萎穿心攻击4 小时前
Unity VS UE 性能工具与内存管理
开发语言·游戏·unity·ue5·游戏引擎·虚幻·虚幻引擎
爱上纯净的蓝天4 小时前
迁移面试题
java·网络·c++·pdf·c#
老赵的博客4 小时前
c++ 常用接口设计
开发语言·c++