-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Conrad Meyer schrieb:
const char *str1, str2; str2 = strchr(str1, 'a');
But str2 must be a const char *.
Maybe I am wrong, I am not very familiar with C++.
Regards, My understanding is you can do something like this:
I am doing something like this
char *str2; const char *str1;
str2 = strchr(str1, 'a'); // This fails on gcc-4.4
When I write
char *str2; const char *str1; char *temp = const_cast<char *>(str1);
str2 = strchr(temp,'a') // This works
Because this issue occurs only on gcc-4.4, I want to ask: is this a bug or a feature?
Best Regards:
Jochen Schmitt