Questions tagged [ambiguous]

An ambiguous call is a situation in which the compiler cannot deduce which version of a function or method to use from the given parameter types. This tag should not be confused with the [ambiguity] tag.

An ambiguous call occurs when the parameters can be converted in many ways such that they fit more than one overload of a function. For example:

void f(float f)
{

}

void f(double d)
{

}

Passing an int value to this function will cause an ambiguous call compiler error, because int can be converted both to float and to double while the compiler is not able to choose the overloaded version of function uniquely.

612 questions
-1
votes
1 answer

Ambiguous call between `vector` and `vector` with initializer_list input

Following code: #include #include #include void fun(const std::vector &x) { std::cout << "long long" << std::endl; } void fun(const std::vector &s) { std::cout << "string" <<…
kilasuelika
  • 165
  • 6
-1
votes
1 answer

C++ Call of overloaded function is ambiguous

I am trying to make a code applying function overload. The two functions are supposed to be distinguished by the type of input and output variables. (The user either inputs an element symbol (std::string) and gets the atomic number (int) or…
Ani0000
  • 33
  • 1
  • 4
-1
votes
2 answers

SQL Joins are not working in Powershell Scripts. Throwing Error

I wrote a SQL script that provides result from the same table through the ID. I need to use this script in PowerShell to extract a result for a purpose. It works in SQL, but it doesn't works in Powershell. Tried using with or without Join…
-1
votes
1 answer

Snakemake-ambiguous rule exception

I got an error message as follows: Rules base_quality_control_fetal and base_quality_control are ambiguous for the file /data/Fetal_BW_European.txt.gz. Consider starting rule output with a unique prefix, constrain your wildcards, or use the…
-1
votes
1 answer

Java 8 The method is ambiguous while override

I have problem with the below code in Java 8. In Java 7, the code works fine but when I changed it to Java 8 it shows this error: The method mymethod(arg1,context,arg2) is ambiguous for the type Z. I tried to use AbstractContext while…
-1
votes
1 answer

Interface vs Class method parameter ambiguity

I am certain that I simply do not know the name for what I am trying to do, otherwise my googling would be more successful. I currently only find results pertaining to interfaces with same named methods. I have a few classes that inherit from a…
jeubank12
  • 891
  • 9
  • 17
-1
votes
1 answer

Getting column ambiguously defined when I shouldn't. Why?

I have two tables that return results when I put them together using UNION ALL, like this: SELECT * FROM TABLE_A UNION ALL SELECT * FROM TABLE_A But for some reason when I add this code into a WITH clause, like below, it does not work: WITH …
Zolt
  • 2,761
  • 8
  • 43
  • 60
-1
votes
3 answers

Fixing Ambiguous Column in WHERE Clause

I need to display a table that corresponds to the value chosen after I select a value in a dropdown list. If I run this query in my SQLPro Studio, and obviously without the $mr_id variable, it says that MR_ID is ambiguous. Is there a way to fix…
Rataiczak24
  • 1,032
  • 18
  • 53
-1
votes
2 answers

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() python dbscan 3 dimensions point

I want to do clustering using DBSCAN algorithm with a dataset that contains 3 points. This is the dataset : 1 5 7 12 8 9 2 4 10 6 3 21 11 13 0 6 3 21 11 13 0 3 7 1 1 9 2 1 5 7 I do clustering with this code : from…
estu
  • 117
  • 1
  • 3
  • 9
-1
votes
1 answer

Ambiguous call of constructor from overloaded operator function in C++

I'm trying to use an overloaded operator for a class with the following members and functions : class MyVector { private: int *data; unsigned int vector_size; public: MyVector(); MyVector(unsigned int n); …
Objective-J
  • 319
  • 1
  • 2
  • 13
-1
votes
1 answer

Outlook COM Interop method event name conflict

I am using the Outlook com interface to automate the creation of emails. I am trying to handle the MailItem.Close Event but the problem is that MailItem also has a MailItem.Close() method. I was hoping the compiler would infer that i was referring…
-1
votes
2 answers

C++ compilation error, ambigous operator overloads

I have a template array class overloading both operator [] to access items and operator T * to get direct buffer access. template< typename T > class buffer { const T & operator [] ( size_t ) const; T & operator [] ( size_t ); …
Virus721
  • 8,061
  • 12
  • 67
  • 123
-1
votes
2 answers

Ambiguous imported type 'PrintJob':'android.print.printjob' or 'android.printservice.printjob' error for android printing app

My name is Ibrahim. I came to America 8 years ago. I have no accent, my voice is very normal. I have developed an interest for computer repair and development ever since I was 12. I first started coding my freshman year of high school last year. I…
-2
votes
1 answer

Integrity constraint violation: 1052 Column 'company_name' in where clause is ambiguous

I am trying to have an AND in my statement but everytime I run the code I get this error: PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'company_name' in where clause is ambiguous select…
yobra89
  • 19
  • 6
-2
votes
1 answer

Swift 3 and Xcode 8.2 - Ambiguous reference to member 'Subscript'

I get a error and I do not know why ... can anyone help me? I am despairing! No other post has helped me. Thank you very much in advance for your answer!! PS: I get the error only when I try to run on my own iphone Image with Error func parseJson()…
KMax
  • 65
  • 1
  • 6
1 2 3
40
41