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 &);
相关推荐
weixin_446260854 分钟前
HANDOFF:基于蒸馏互补教师的人形机器人任务空间整体控制
人工智能·算法·机器人
c2385610 分钟前
C++11final与override6、智能指针
开发语言·c++
*neverGiveUp*14 分钟前
初步了解Django框架
开发语言·python·django
Java_2017_csdn16 分钟前
在 Java 中,MessageFormat.format() 和 String.format() 函数对比?
java·开发语言·前端·数据库
绛洞花主敏明26 分钟前
Go操作xorm中间表多对多关联实战
开发语言·后端·golang
Jun62627 分钟前
QT(4)-EXCEL操作
开发语言·qt·excel
商业模式源码开发29 分钟前
知识付费推三返一模式详解:规则设计、分红算法与合规架构
算法·架构·推三返一
fengfuyao98531 分钟前
基于MATLAB的HHT变换完整实现(含EMD分解与三维时频谱生成)
开发语言·算法·matlab
剑挑星河月31 分钟前
98.验证二叉搜索树
java·算法·leetcode
kupeThinkPoem35 分钟前
c++是否会读到部分写入的数据?
c++