What are the purposes of using ifndef and define? When should it be used and why?
I made a simple program in class just to go over the basic of Friends in classes but it wouldn't work and I was getting errors all over even though I went through it and everything was correct. One of my headers was being use for its own implementation and included at another header. Once I was able to put ifndef and define in the header that was being used twice , my program worked.
So I'm confused what it did.