When I compile I got these errors
multiple definition of `Book::Book(std::string)'
multiple definition of `Book::getName(std::string)'
multiple definition of `Book::setName(std::string)'
I don't know where the problem lies...thanks in advanced
Yes, please post other source files along with information on how you are compiling your project.
Completely unrelated to that, I strongly encourage you NOT to:
a) Write "using" clauses in header files; (line 7)
b) Include additional headers AFTER writing any "using" clauses in your .cpp files (lines 4-5)
Well thanks both for try to help me...jsmith I follow your advices (B) and then magically it worked (but I don't know why I must do it in that way).
I have a question know...how can I ommit the using clause in my header file?...I try in this way (std::string) in lines 12, 13 , 14 and 18...but I get errors.
You should just be able to prefix all the strings with std:: and then remove the
using std::string (but keep the include). Is that not working for you?