[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sv: Miscellanous stuff



>I prefer Hungarian for some parts of my _members_. I use it only for
>members in classes, as these have a kind of global scope within a class.
>Normally GUI widgets all get prefixed by 'btn', 'xpm', 'lb' etc (button,
>pixmap, and listbox). I also _always_ prefix members with a 'm_'. So a
>listbox would be like 'm_lbServers' for a listbox with some kind of
>servers. Using 'm_' makes it easy to do methods that set some member,
>like:
>
>  Foo::setBar (int Bar) {
>      m_Bar = Bar;
>  }
>
>You don't have to rename the parameter to 'NewBar' or similar, and you
>always recognize your members and don't mix them up with local variables.

I personally also use a very limited version of Hungarian: I, as you, prefix
all members with "m_" and I always prefix all pointers with p, so a member
char* would be m_pStr.