Hello,
I am very new to C++ and this weeks class we had to do 5 files: Main.cpp Circle.cpp Square.cpp and then circle.h and square.h
I was able to get the 5 files, and I believe all the code is written for each file, but I am now getting an error:
error: ld returned 1 exit status.
I believe I am also suppose to put #include "circle.h" and #include "square.h" near the top, but it errors on me when I do. Will this make a difference?
Thank you,
I am now getting an error:
error: ld returned 1 exit status.
That's a linker error. Presumably, your linker will be telling you more than just that - there will be more detailed information about why it's failing to link. It's always better to share the information you have with us, rather than withholding it, so in future, please post the full error messages you have.
You've defined your main function to be a member of Square. This means that you've defined a method Square::main(), but nowhere in your code do you have an actual main() function.