Hey Everyone!!
My assignment is to Design a Class named PersonData with the following members
-- last name
-- first name
-- address
-- city
-- state
--zip
--phone
Next I have to create a class named CustomerData
I created and coded everything I need but Im getting this weird error I have never seen before!
The Error is
Build/Intermediates/CustomerData.build/Debug/CustomerData.build/Objects-normal/x86_64/CustomerData.o
ld: 44 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any Help is much appreciated! Thank you in advance! Here are my files it says its from customerData.cpp file
Why are you including the cpp files ?
Remove all the #include "ClassName.cpp"
lines or try replacing them with the header files instead so.
Unlike the header files, the source file don't have include guards, making the same thing potentially appear twice/multiple times in a source file.
That's what the error means, the linker sees the symbols defined multiple times.