CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Feb 2011
    Posts
    54

    error: overloads have similar conversions

    I have these overload functions which take different parameters...and basically concatenate two strings together except for the first declaration. The error that arises is c2666 which basically says that they have similar conversions...any ideas on fixing this?

    Code:
    String& operator+(const String& s);
    
    friend String operator+(const String& s, const String& t);
    friend String operator+(const String& s, const char* t);
    friend String operator+(const char* s, const String& t);
    friend String operator+(const String& s, char t);
    friend String operator+(char s, const String& t);
    Last edited by rjs123; April 17th, 2011 at 05:44 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured