提问人:Tobias 提问时间:3/11/2021 更新时间:3/11/2021 访问量:116
如何使用两个同名但命名空间不同的函数?
How to use two functions with the same name but different namespaces?
问:
我的代码示例wirtten for Linux中存在以下问题:
例子.h
namespace abc
{
int open();
}
example.cc
#include <sys/ioctl.h>
#include "example.h"
int abc::open()
{
int a = open("abc", 123);
}
我打算在 ioctl.h 的上下文中使用 open(“abc”, 123),但该函数按照我的命名空间 abc 中的定义使用。
如何编写程序以使用正确的 open() 函数?
感谢您的帮助。
托比亚斯
答: 暂无答案
下一个:PHP 全局函数
评论
::open(....)