+ 1
Can someone show me of an example of composition im seperate files?
the example in the app show it all in the main source file . but when I try composition through the header and source files class don't recognise the other. also is composition necessary?
2 odpowiedzi
+ 1
I think that I can help you with my example codes:
Main.cpp: https://code.sololearn.com/c8Q0j779yXSp/#cpp
Birthday.h: https://code.sololearn.com/c0yg2QYwumNG/#cpp
Birthday.cpp: https://code.sololearn.com/c4n6jagB4Ldm/#cpp
Person.h: https://code.sololearn.com/cGNdS7r9dfoe/#cpp
Person.cpp: https://code.sololearn.com/ck5rMG4fUeqD/#cpp
0
www.sitesbay.com/cpp/cpp-header-files