问题标签 [ambiguous]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
10 回答
5971 浏览

wcf - Ambiguous reference in WCF and client application

I've managed to reproduce one of the errors in a test project with a similar structure to my production code. It consists of three simple projects:

Common (class library):

Library (WCF service library), which has a reference to Common:

ClientApp (console application), which has a reference to Common, and a service reference to Library called "LibraryServiceReference":

The app.config files in ClientApp and Library are auto-generated and I have not modified them, and I have not changed the default configuration for the LibraryServiceReference in ClientApp.

When I compile this solution, I get the following errors in the ClientApp project:

Error 1

Error 2

please help me to fix this.

0 投票
1 回答
163 浏览

string - 错误 C2593: 'operator =' 在 vc6 项目中转换为 vc9 时不明确

在vc6中,代码

完美执行,但在 vc9 中给出错误 C2593: 'operator =' is ambiguous

我可以只用吗

0 投票
1 回答
108 浏览

c++ - 复杂继承情况下的模糊函数调用

我有以下代码:-

这给了我一个错误说:-

关于如何解决这个问题的任何想法?

0 投票
1 回答
747 浏览

vb.net - “HttpWebRequest”在命名空间“System.Net”中不明确。

可能重复:
已保存的程序,现在无法编译

我有一大堆这些错误,还有设计师错误等等。我检查了对象浏览器,它并不模棱两可,只有 system.net 中的一个 HttpWebResponse 实例

我已经黔驴技穷了。昨天编译的。我保存它并今天打开它,它不再编译。也有一堆设计师错误..

0 投票
2 回答
13466 浏览

c++ - 为什么在 Mac OS X 上使用 size_t 时 uint32_t 和 uint64_t 之间存在歧义?

考虑以下示例代码:

这在 Mac OSX 上失败:

为什么?因为 'size_t' 应该是无符号的并且是 32 位或 64 位宽。那么歧义在哪里呢?

尝试使用 'unsigned long x' 而不是 'size_t x' 会导致类似的歧义错误消息。

在 Linux/Solaris 系统上,使用不同的 GCC 版本、不同的体系结构等进行测试,没有报告歧义(并且每个体系结构都使用了正确的重载)。

这是 Mac OS X 的错误还是功能?

0 投票
3 回答
535 浏览

c++ - C++:构造函数歧义

这会引起歧义吗?:

0 投票
3 回答
202 浏览

c++ - 以 NULL 作为参数的调用中的重载解决方案

我有两个重载的构造函数:

这些构造函数中的任何一个都可以获取内存地址。如果我这样做了,Hello hi(NULL);那么哪个会被调用?

另外,如果您可以解释规则,因为它们涉及重载的对象。类似地,如果我有一个构造函数对参数 ( Object::Object(long x)) 使用了 long,而另一个重载 ( Object::Object(SomeOtherObject o)) 使用了一个对象,该对象本身对 long ( SomeOtherObject::SomeOtherObject(long x)) 进行了重载。然后我打电话Object obj((long)5);是否保证会打电话给另一个?

0 投票
2 回答
4490 浏览

haskell - printf 和不明确类型变量的问题

我有一个有点模棱两可的类型变量问题。我喜欢haskell,但这确实是我仍然无法处理的。问题很简单,涉及到 Text.Printf 中的 printf。由于问题非常普遍,我将仅在一些示例代码中:

当然 printf 是进口的。然后编译器在 Num 和 PrintfArg 之间给出了一个明显的、模棱两可的类型变量错误。我只是不知道在哪里适合正确的类型签名。

0 投票
2 回答
683 浏览

c++ - c++ 编译错误:重载 '<function_name>(char*&)' 的调用不明确

我正在尝试将 C 语言中的代码转换为 C++ 语言,但出现错误,但我不知道问题的根源是什么。

这是源代码: http: //pastebin.com/PnKvgNsR

错误信息是:

使用 g++4.7.1(包括 c++11 标准)编译。

0 投票
2 回答
834 浏览

c++ - 模棱两可的类继承

但问题是:

在成员函数中'float Tcilindro::area_total()':