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 &);
相关推荐
Mr_Xuhhh2 小时前
YAML相关
开发语言·python
阿巴~阿巴~2 小时前
JsonCpp:C++ JSON处理利器
linux·网络·c++·json·tcp·序列化和反序列化
Promise4852 小时前
贝尔曼公式的迭代求解笔记
笔记·算法
咖啡の猫2 小时前
Python中的变量与数据类型
开发语言·python
前端达人2 小时前
你的App消息推送为什么石沉大海?看Service Worker源码我终于懂了
java·开发语言
汤姆yu3 小时前
基于springboot的电子政务服务管理系统
开发语言·python
全栈师3 小时前
C#中控制权限的逻辑写法
开发语言·c#
S***q1923 小时前
Rust在系统工具中的内存安全给代码上了三道保险锁。但正是这种“编译期的严苛”,换来了运行时的安心。比如这段代码:
开发语言·后端·rust
打点计时器3 小时前
matlab 解决wfdb工具使用本地数据集报错
开发语言·matlab
zmzb01033 小时前
C++课后习题训练记录Day38
开发语言·c++