my header file wont compile..it is saying something is with the the function volume..."Box.obj : error LNK2005: "public: double __thiscall CBox::Volume(void)const " (?Volume@CBox@@QBENXZ) already defined in Ex9_08.obj
Debug/Ex9_08.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe."
here is the code
help is appreciated....Code:// Box.h: interface for the CBox class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_BOX_H__FC3564E5_37CD_11D7_AB37_00A0CC585627__INCLUDED_) #define AFX_BOX_H__FC3564E5_37CD_11D7_AB37_00A0CC585627__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CBox { public: double GetHeight() const { return m_Height; } double GetBreadth() const { return m_Breadth; } double GetLength() const { return m_Length; } double Volume() const; CBox(double lv = 1.0, double bv = 1.0, double hv = 1.0); virtual ~CBox(); private: double m_Height; double m_Breadth; double m_Length; }; double CBox::Volume() const { return m_Breadth*m_Height*m_Length; } #endif // !defined(AFX_BOX_H__FC3564E5_37CD_11D7_AB37_00A0CC585627__INCLUDED_)