# String: how do I solve ambiguous overload for operator ==?

**URL:** <https://forum.juce.com/t/string-how-do-i-solve-ambiguous-overload-for-operator/3802>\
**Category:** General JUCE discussion\
**Created:** [April 1, 2009, 9:30am UTC](https://forum.juce.com/t/string-how-do-i-solve-ambiguous-overload-for-operator/3802 "2009-04-01T09:30:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nonchai](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nonchai/32/1507_2.png) [@nonchai](https://forum.juce.com/u/nonchai)\
**Post date:** [April 1, 2009, 9:30am UTC](https://forum.juce.com/t/string-how-do-i-solve-ambiguous-overload-for-operator/3802/1 "2009-04-01T09:30:45Z")

</div>

in the code

String ext ( “zxcv”) ;  
if ( ext == “.” ) {

i get the error:

error: ambiguous overload for ‘operator==’ in ‘ext == “.”’

note: candidates are:  
operator==(const char\*, const char\*)   
bool juce::String::operator==(const juce::String&) const

how do i solve this ?? i have loads of similar code where i test String’s agains string literals…

it appears to be to do with the inclusion of parts of the STL ( i use vectors ) how can i make JUCE and the STL live together happily ?

---

<div class="post-metadata">

**Author:** ![nonchai](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nonchai/32/1507_2.png) [@nonchai](https://forum.juce.com/u/nonchai)\
**Post date:** [April 1, 2009, 2:16pm UTC](https://forum.juce.com/t/string-how-do-i-solve-ambiguous-overload-for-operator/3802/2 "2009-04-01T14:16:34Z")

</div>

OK - ! solved.

just had to wrap all my string literals with T(…)

as they say : “RTM” 🙂
