The following code does not compile:
#include <iostream>
class close {
public:
void message();
};
inline void close::message()
{
std::cout << "Close class\n";
}
int main()
{
close c;
c.message();
}
The message given by g++ is:
other.cc: In function `int main()':
other.cc:15: error: `close' undeclared (first use this function)
other.cc:15: error: (Each undeclared identifier is reported only once for each
function it appears in.)
other.cc:15: error: syntax error before `;' token
other.cc:17: error: `c' undeclared (first use this function)
I don't understand it. I've looked for a list of reserved words in C++ and
'close' is not there.
--
Roman Werpachowski
/--------==============--------\
| http://www.cft.edu.pl/~roman |
\--------==============--------/