Link to home
Start Free TrialLog in
Avatar of Elliot123
Elliot123Flag for United States of America

asked on

Use of header files

Last night I discovered I could put parts of my program in new header files, include those header files in MyDlg.cpp, and make for a more orderly environment. So, I thought, I can put all my startup stuff in StartUp.h, all my ordring stuff in Orders.h, all my cancellation stuff in Cancellations.h. Then I thought it might be a good idea to ask if this approach will lead to problems down the road, so I haven't made more than a few new header files. Is this a workable approach? Is there a pitfall waiting down the road? Thanks
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

No technical problems that I know of.  (But I don't see any real advantages either - it is just for your organising, as long as you are happier with it then do it).

If you have one .h/.cpp per class then (if you want to do so) you can easily copy/paste to another folder for use in another project.  However if the .h/.cpp had multiple classes then you might have to manually remove the undesired ones.
copy/paste to another project - I mean the files themselves.
ASKER CERTIFIED SOLUTION
Avatar of mahesh1402
mahesh1402
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial