function question

hi all,

just wodering what the standard practice is around locating function code, e.g. if I have a program which has say 10 different functions, would the standard practice be to have them all in main.cpp or would you be inclined to store the function bodies in a seperate file? if sepearte file is the norm, any examples for me to look at?

Thanks.
Depends. Functions that "belong together" should be grouped together in a cpp file.
But to have one file per function would be nonsense. One class per cpp file is an acceptable and widely followed design rule, though.
thanks for the response, currently working through classes, hopefully should all fall into place.
Topic archived. No new replies allowed.