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 &);
相关推荐
梵尔纳多几秒前
OpenGL着色器语言(GLSL)
c++·opengl·着色器
你怎么知道我是队长7 分钟前
C语言---输入和输出
c语言·开发语言
net3m3310 分钟前
单片机屏幕多级菜单系统之当前屏幕号+屏幕菜单当前深度 机制
c语言·c++·算法
mmz120711 分钟前
二分查找(c++)
开发语言·c++·算法
你怎么知道我是队长17 分钟前
C语言---文件读写
java·c语言·开发语言
陌路2018 分钟前
C++30 STL容器 -deque双端队列
开发语言·c++
AI视觉网奇22 分钟前
ue 自己制作插件 c++
c++·ue5
Insight23 分钟前
拒绝手动 Copy!一文吃透 PyTorch/NumPy 中的广播机制 (Broadcasting)
算法
xb113237 分钟前
C#委托详解
开发语言·c#
brent42337 分钟前
DAY50复习日
开发语言·python