C++的命名空间
本文是ChernoP61视频的学习笔记。
如P60的代码,有两个print函数它们有不同的函数签名,一个参数是string,一个参数是const char。若转变为两者都接受const char*,不使用命名空间可能会出现问题。
#include<iostream>
#include<string>
//namespace apple {
void
本文是ChernoP61视频的学习笔记。
如P60的代码,有两个print函数它们有不同的函数签名,一个参数是string,一个参数是const char。若转变为两者都接受const char*,不使用命名空间可能会出现问题。
#include<iostream>
#include<string>
//namespace apple {
void