compilation error with g++ compiler version 3.4.3
in following code I am getting compilation error.
Code is below:
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
class TEST;
class ONE
{
friend class TEST;
void fun(const TEST& value)
{
value.a;
}
};
class TEST
{
protected:
int a;
};
int main()
{
return 0;
}
__
Errors is:
g++ -g test.C -o test
test.C: In member function `ONE& ONE::operator=(const TEST&)':
test.C:12: error: invalid use of undefined type `const struct TEST'
test.C:5: error: forward declaration of `const struct TEST'
What could be problem?
Message was edited by:
neerajrathi2

