I have class A:
//A.h
`public:
A();`
//A.hpp
#include "A.h"
A::A(){
std::cout<<"constructor"ף
}
I have several places in the code that do an instance of “A” like that:
A a;
but I get error “one or more multiply defined symbols found“
but when I copy the implamntion of “A” constructor to “A.cpp” or to “A.h” I dont get the error.
what is the problem?
How is it going in cpp?
New contributor
Yael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.