Thread: Function Declaration in Interface File :: MFC

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    Function Declaration in Interface File :: MFC

    Hi.

    Regarding C++ windows programming, is it a convention to include both data type and variables names for function parameters in the declaration file?

    For example:


    class MyFrame : public CFrameWnd{public: MyFrame(); functionA(int &var, char &str); protected: afx_msg OnPaint(); afx_msg OnLButtonDown(UINT nChar, UINT nRep, UINT nFlags);// afx_msg OnLButtonDown(UINT, UINT, UINT);...private:...};


    I am used to not including anything more than what is necessary.

    Kuphryn

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I just show the types in the declaration.........just habit I suppose

    Though I guess it makes your headers more readable if you list the names too

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  3. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  4. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM