C
Charles Jamieson
I am getting an inexplicable compile-time error message. Here is the code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#include <string>
class CBerk
{
public:
CBerk();
CBerk( std::string ) {}
char *readUsingKeyword( char *keyword ) {}
};
main( int argc, char *argv[] )
{
CBerk db(std::string(argv[1]));
char* record = db.readUsingKeyword(argv[2]);
}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I have extracted the relevant parts of the code. These are the lines
that produce the error.
Here is the error message from gcc 3.3.3
search_test.cpp:15: error: request for member `readUsingKeyword' in
`db', which
is of non-aggregate type `CBerk ()(std::string*)'
I cannot see any problem with this.
-charles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#include <string>
class CBerk
{
public:
CBerk();
CBerk( std::string ) {}
char *readUsingKeyword( char *keyword ) {}
};
main( int argc, char *argv[] )
{
CBerk db(std::string(argv[1]));
char* record = db.readUsingKeyword(argv[2]);
}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I have extracted the relevant parts of the code. These are the lines
that produce the error.
Here is the error message from gcc 3.3.3
search_test.cpp:15: error: request for member `readUsingKeyword' in
`db', which
is of non-aggregate type `CBerk ()(std::string*)'
I cannot see any problem with this.
-charles