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 &);
相关推荐
ceffans4 分钟前
PDF文档中图片解析
c++·windows·pdf
计算机小白进化版CM8 分钟前
蓝桥杯备考1
算法·职场和发展·蓝桥杯
laizhenghua9 分钟前
Java实现pdf文件压缩(aspose-pdf实现压缩、itextpdf去除aspose-pdf版权水印)
java·开发语言·pdf
羑悻的小杀马特12 分钟前
嵌入式迷雾:现状谜团待解,未来行情走向何方?
c++·嵌入式
鲤籽鲲3 小时前
C# Enumerable类 之 数据筛选
开发语言·c#
Liu_Meihao4 小时前
【算法】799. 最长连续不重复子序列
数据结构·算法
C#Thread5 小时前
C#上位机--一元运算符
开发语言·c#
正在敲代码中5 小时前
变换队列c++
数据结构·c++·算法
爱跨境的笑笑7 小时前
Skype for Business网络延迟怎么办?
大数据·开发语言·网络·tcp/ip·php
yonuyeung7 小时前
代码随想录算法【Day57】
数据结构·算法