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 &);
相关推荐
yeflx5 分钟前
CMake+CUDA
c++
大柏怎么被偷了7 分钟前
【C++】哈希的应用
算法·哈希算法
血小板要健康11 分钟前
如何计算时间复杂度(上)
java·数据结构·算法
henujolly15 分钟前
ethers.js读取合约信息
开发语言·javascript·区块链
Eugene__Chen18 分钟前
Java关键字(曼波版)
java·开发语言
古城小栈18 分钟前
Rust Vec与HashMap全功能解析:定义、使用与进阶技巧
算法·rust
wWYy.25 分钟前
详解哈希表
数据结构·算法·散列表
无望__wsk44 分钟前
Python第一次作业
开发语言·python·算法
Word码1 小时前
[C++语法]-vector(用法详解及实现)
开发语言·c++
安全二次方security²1 小时前
CUDA C++编程指南(7.15&16)——C++语言扩展之内存空间谓词和转化函数
c++·人工智能·nvidia·cuda·内存空间谓词函数·内存空间转化函数·address space