This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
PR 2989
- To: libstdc++ at gcc dot gnu dot org
- Subject: PR 2989
- From: Dirk Mueller <dmuell at gmx dot net>
- Date: Mon, 4 Jun 2001 22:44:22 +0200
Hi,
can ANYONE compile this snippet of code with gcc 3 branch ?
#include <string.h>
#include <iostream>
using namespace std;
int main() {
char foo[300];
char* bar = "foo";
strcpy(foo, bar);
}
For WEEKS gcc 3 is unusable for me as I can't compile ANY bit of code out
there. Am I really the only one experiencing this problem ?
The error message is:
call of overloaded `strcpy(char[300], char*&)' is ambiguous
/usr/include/string.h:78: candidates are: char* strcpy(char*, const char*)
/usr/local/include/g++-v3/bits/std_cstring.h:104: char*
std::strcpy(char*, const char*)
I'm using Linux x86/glibc 2.2.2, which shouldn`t be too uncommon.
Dirk