CArrow_i::CArrow_i( int x, int y, int w, int h, int bla )
: CItem( x, y, w, h )
{
bla2 = bla;
}
then I get:
multiple definition of `CArrow_i::CArrow_i( ...
multiple definition of..
Hello! I have a little problem.
I get an error if I put my constructor function in a .cpp file
It works if I put it in my .hpp file! ( in the class )
Thank you! :)
#ifndef __CARROW_HPP__#define __CARROW_HPP__class CArrow_i : public CItem{ public: CArrow_i( int x, int y, int w, int h, int bla ); //.. //..};#endif
#ifndef __CARROW_HPP__#define __CARROW_HPP__CItem__CArrow.hppclass CArrow_i : public CItem{ public: CArrow_i( int x, int y, int w, int h, int bla ); //.. //..};#endif
.cpp
[/source]
#include "header.hpp"
CArrow_i::CArrow_i( int x, int y, int w, int h, int bla )
: CItem( x, y, w, h )
{
bla2 = bla;
}
[/source]
header.hpp
#include "CItem__CArrow"//..
? :/
thank you
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement