Hi everybody,
I appreciate your advice and help on the following compilation
problem I have with gcc 3.4.2-6 which comes with Fedora Core 3. Using
gcc 3.2.3 or 3.3, the code compiles with no problem. For the following
piece of code:
#include <stdlib.h>
template <class T>
class B {
public:
B() {}
protected:
int* state;
};
template <class T>
class C : public B<T> {
public:
C() {
state = NULL;
}
};
int main() {
C<int> c();
return 0;
}
I get an error message on line "state = NULL". It says that "state" is
undeclared. However, when I replace that line with "this->state =
NULL", the compiler doesn't complain anymore.
Is this a compiler bug? Is this about a new C++ standard enforced in
gcc 3.4.x? Once again, I appreciate your time.
Regards,
--Salem
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus