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 &);
相关推荐
Q***f6351 天前
Java数据可视化应用
java·开发语言·信息可视化
SundayBear1 天前
嵌入式操作系统进阶C语言
c语言·开发语言·嵌入式
hygge9991 天前
synchronized vs CopyOnWrite 系列
java·开发语言·经验分享·面试
-森屿安年-1 天前
LeetCode 11. 盛最多水的容器
开发语言·c++·算法·leetcode
flashlight_hi1 天前
LeetCode 分类刷题:112. 路径总和
javascript·算法·leetcode
ouliten1 天前
C++笔记:std::stringbuf
开发语言·c++·笔记
Rhys..1 天前
Jenkinsfile保存在项目根目录下的好处
java·开发语言
lly2024061 天前
SQL LCASE() 函数详解
开发语言
0***K8921 天前
PHP框架比较
开发语言·php
哟哟耶耶1 天前
ts-属性修饰符,接口(约束数据结构),抽象类(约束与复用逻辑)
开发语言·前端·javascript