This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: funny syntactical error message
- To: gcc at gcc dot gnu dot org,Ulrich dot Lauther at mchp dot siemens dot de
- Subject: Re: funny syntactical error message
- From: rlau at csc dot com
- Date: Wed, 8 Mar 2000 12:22:44 -0600
In the inline function access, are you trying to return a specific element of
bar[] ? If so, your syntax might be the source of the problem.
Try
return bar[i];
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Compilation of
class foo {
public:
int fudge[40];
int bar [40];
inline int access(int i) {
return bar(i);
}
};
gives
test.C:7: `(this + 160)' cannot be used as a function
if fudge is ommitted, you get
test.C:7: `this' cannot be used as a function
Why not "bar cannot be used as a function?"
(this is 2.95.1)
--
-lauther