Hi All
I have the most simple situation, but I cannot compile it
I have the following files: main.C, Book.C and Book.h:
Book.h:Book.C:Code:class Boek { public: Boek() ; ~Boek() {} void print() ; } ;main.C:Code:#include "Book.h" Book::Book() {} void Book::print() {}If I compile this code like: c++ main.C Book.CCode:#include "Book.h" #include <string> #include <iostream> using namespace std ; int main() { Book book() ; book.print() ; return 0 ; }
I get the following error:If I remove the line book.print() eveything compiles fineCode:main.C:9 error: request for member ‘print’ in ‘book’, which is of non-class type ‘Book ()()’
Any suggestions what I do wrong here ?
Thanks a lot
LuCa



LinkBack URL
About LinkBacks



