LibItemという抽象基本クラスと、BookとDVDという2つの継承されたクラスがあります。これらのクラスごとに.hファイルと.cppファイルを作成しました。
私は今、これらのファイルを使用するためにメインでいくつかのコードを実行したいと思っています。
現在、メインコードの先頭に.hファイルを含めています。これは機能していません。
これらのファイルを使用する前にコンパイルする必要がありますか?もしそうなら、どうすればこれを行うことができますか?
アップデート
これが私のコードです:
//---------------------------------------------------------------------------
#ifndef BookH
#define BookH
class Book : public LibItem
{
public:
Book(const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, const std::string&);
void setISBN(const std::string&);
std::string getISBN();
void PrintDetails();
private:
Book();
std::string ISBN;
};
//---------------------------------------------------------------------------
#endif
次のエラーが発生します。
[BCC32 Error] Book.h(7): E2303 Type name expected
[BCC32 Error] Book.h(9): E2090 Qualifier 'std' is not a class or namespace name
[BCC32 Error] Book.h(9): E2293 ) expected
[BCC32 Error] Book.h(10): E2090 Qualifier 'std' is not a class or namespace name
これらのエラーについてサポートをお願いできますか?