Mail Archives: djgpp/1999/01/20/07:49:50
hi all,
i downloaded minfo. when i ran make, i got the foll error.
gcc -c -Wall diskpane.cc
diskpane.cc: In method `void disk_pane::update_directory_name()':
diskpane.cc:294: ambiguous overload for `char + String &'
diskpane.cc:294: candidates are: operator +(long int, const char *)
<builtin>
c:/djgpp/lang/cxx/_string.h:701: operator +(const String
&, const String &)
c:/djgpp/lang/cxx/_string.h:711: operator +(const String
&, const char *)
diskpane.cc:297: ambiguous overload for `char + String &'
diskpane.cc:297: candidates are: operator +(long int, const char *)
<builtin>
c:/djgpp/lang/cxx/_string.h:701: operator +(const String
&, const String &)
c:/djgpp/lang/cxx/_string.h:711: operator +(const String
&, const char *)
make.exe: *** [diskpane.o] Error 1
when i opened the _string.h file i found that operator + is also defined
as
operator +(const String&, const char)
why did gcc not take this definition as it is more suitable for the above
operation?
raju
- Raw text -