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 &);
相关推荐
谎言西西里1 小时前
LeetCode 热题100 --- 双指针专区
算法
qq_466302453 小时前
vs2008 Hotlink实时数据读取
c++·qt
代码or搬砖4 小时前
String字符串
android·java·开发语言
阿达King哥4 小时前
关于C++中的typedef typename的含义
c++
leo__5204 小时前
基于两步成像算法的聚束模式SAR MATLAB实现
开发语言·算法·matlab
前端小白在前进5 小时前
力扣刷题:在排序数组中查找元素的第一个和最后一个位置
数据结构·算法·leetcode
Macbethad5 小时前
自动化测试技术报告
开发语言·lua
不会画画的画师5 小时前
Go开发指南:io/ioutil包应用和迁移指南
开发语言·后端·golang
2503_928411565 小时前
12.22 wxml语法
开发语言·前端·javascript
咔咔咔的5 小时前
3652. 按策略买卖股票的最佳时机
c++