Thread: Convention in C/C++

  1. #16
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Chch, NZ
    I despise hungarian (for reasons that have been well-covered by salem and others), but I do use an 'm_' prefix for members. This allows for easy differentiation of parameters and members, esp in mutators.
    class X
        void SetY(int y)
             m_y = y;
        int m_y;
    it's basically shorthand for this->y and it's not actually hungarian, btw.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  2. #17
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Sorry for the long reply. Been busy programming for awhile. Thanks to all of you. I see that many programmers did what I do. I also only use Hungarian Convention for member variables (m_...), pointers (p...), and constants (c_...). And here I thought that I will get a bad karma if I didn't use a right convention.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. calling convention stdcalll and cdecl call
    By George2 in forum Windows Programming
    Replies: 1
    Last Post: 07-17-2008, 03:26 AM
  2. What do you think of this C++ naming convention?
    By cnsr in forum C++ Programming
    Replies: 10
    Last Post: 01-07-2004, 08:51 PM
  3. Replies: 2
    Last Post: 01-04-2003, 01:16 AM
  4. VB Calling Convention?!
    By minime6696 in forum Windows Programming
    Replies: 6
    Last Post: 03-27-2002, 04:39 PM
  5. Maya Convention
    By DavidP in forum A Brief History of
    Replies: 3
    Last Post: 03-01-2002, 11:10 PM