Original Post
I WONDER WHY FOR A CLASS WE USE 2 FILES.HEADER FOR PROROTYPE AND CPP FOR THE DEFINITIONS.I MEAN WHAT happens if i write the functions definition in the header file too.instead of doing void aclass::member_a(){
//code here
}
in .cpp /is there an adventage of this or its used in includes for not getting errors with redefinition or something.and i have another question when i create a class in a cpp to see it in another header file i do extern thename i created /but in another cpp i cant do extern cause i include the header i used extern in the other cpp i want to use that class too.so it gives error in extern line.please help me...thanks