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 &);
相关推荐
CC.GG2 分钟前
【C++】C++11(二)可变模板参数模板、新的类功能、包装器(function、bind)
开发语言·c++
仰泳的熊猫4 分钟前
题目 1429: 蓝桥杯2014年第五届真题-兰顿蚂蚁
数据结构·c++·算法·蓝桥杯
苦藤新鸡10 分钟前
35.LRU缓存(最久未访问)问题
算法·链表·缓存
Yupureki12 分钟前
《算法竞赛从入门到国奖》算法基础:入门篇-分治
c语言·开发语言·数据结构·c++·算法·贪心算法
无心水15 分钟前
4、Go语言程序实体详解:变量声明与常量应用【初学者指南】
java·服务器·开发语言·人工智能·python·golang·go
ZPC821015 分钟前
psutil
开发语言·php
充值修改昵称15 分钟前
数据结构基础:B*树B+树的极致优化
数据结构·b树·python·算法
jiunian_cn16 分钟前
【C++】线程库
开发语言·c++
0x5317 分钟前
JAVA|智能仿真并发项目-并行与并发
java·开发语言
one____dream17 分钟前
【算法】相同的树与对称二叉树
b树·python·算法·递归