qysh

2011年11月17日

C++中遇到同名函数问题,可以使用命名空间解决

摘要: #include "stdafx.h"#include <iostream>using std::cout; //使用命名空间std中的coutusing std::endl;namespace mycode //在自己的mycode命名空间中定义foo()函数{ void foo() { cout<<"foo"<<endl; }}void foo() //定义foo()函数{ cout<<"another foo"<<endl;}i... 阅读全文

posted @ 2011-11-17 14:15 qysh 阅读(843) 评论(0) 推荐(0) 编辑

导航