View Single Post
Join Date: Dec 2005
Posts: 109
Reputation: complete is an unknown quantity at this point 
Solved Threads: 0
complete's Avatar
complete complete is offline Offline
Junior Poster

Methods before Members or Members before Methods?

 
0
  #1
Sep 12th, 2007
Methods before Members or Members before Methods?

In a header file, which do you define/declare first. Do you list all your variables before the methods (also known as functions), or do you do it the other way around?

I always thought that you put the variables first. That was the way I was taught in school. Now I hear that that is wrong and you have to do it the other way. I am told you should list the methods first.

I know this is all just asthetic. But there must be a set accepted way to do this. What is it? I mean, if you were looking at some sample/example C++ code, how would you expect to see the header files to be written?
Reply With Quote