E
exits funnel
Hello,
I'm working my way through Bruce Eckel's Thinking in C++ and I've run
into a small problem. This code is from his book:
class Fi
{
public:
Fi( ) { }
};
class Fee
{
public:
Fee(int) { }
Fee(const fi&) { }
};
int main( )
{
Fee fee = 1;
Fi fi;
Fee fum = fi;
}
He claims this should all work but my compiler complains as follows:
ex19.cpp:11: parse error before '&'
ex19.cpp:11: missing ';' before right brace
ex19.cpp:12: parse error at null character
ex19.cpp: In function 'int main( )':
ex19.cpp:18: conversion from 'Fi' to non-sclaler type 'Fee' requested.
So, what gives? Is his text wrong or is my compiler broke? By the way
the compiler is gcc 2.96
Thanks in advance for any replies!
-exits
I'm working my way through Bruce Eckel's Thinking in C++ and I've run
into a small problem. This code is from his book:
class Fi
{
public:
Fi( ) { }
};
class Fee
{
public:
Fee(int) { }
Fee(const fi&) { }
};
int main( )
{
Fee fee = 1;
Fi fi;
Fee fum = fi;
}
He claims this should all work but my compiler complains as follows:
ex19.cpp:11: parse error before '&'
ex19.cpp:11: missing ';' before right brace
ex19.cpp:12: parse error at null character
ex19.cpp: In function 'int main( )':
ex19.cpp:18: conversion from 'Fi' to non-sclaler type 'Fee' requested.
So, what gives? Is his text wrong or is my compiler broke? By the way
the compiler is gcc 2.96
Thanks in advance for any replies!
-exits