Very quick question

hello, when i create a new class ( for my player or enemy or bullet etc.) do i need to have it in its own header file? i already do, but could i just have the class definition above the main(). ? thankyou
you may do this, but your code becomes less modular, ie you would then not be able to share this class with other projects as easily.
ahh i see thankyou. so it is best to put it in its own header so i can re use that code and header in its own type
Topic archived. No new replies allowed.