Error: "cout" is ambiguous.

Oct 10, 2012 at 6:35pm
what do i do to take the red squiggly out from under the cout word when it says it is ambiguous?
Oct 10, 2012 at 6:39pm
post some code.

You probably
A) Forgot #include <string>
B) declared a variable called cout
Oct 10, 2012 at 6:45pm
closed account (3qX21hU5)
Removed because of bad info
Last edited on Oct 10, 2012 at 7:49pm
Oct 10, 2012 at 7:27pm
closed account (zb0S216C)
Ambiguities will not be the result of neither failing to include "iostream", nor will it be the result of not declaring the said identifier. These errors, in your case, means the compiler was not able to choose one of the overloaded "ostream::operator << ( )" operators based on the actual parameter. In other words, the actual parameter given to "std::cout" was compatible (convertible) with two or more overloads of its "operator << ( )" and, therefore, was not able to choose which overload to call; thus, ambiguity.

Wazzak
Topic archived. No new replies allowed.