?
Solved

Varible Naming Conventions

Posted on 2001-06-18
5
Medium Priority
?
231 Views
Last Modified: 2010-04-02
Hi,

Does anyone no where i can find a reference varible naming conventions? for VC and Windows programming?

What are the following varibles ?

*SzHeaders
*dwRect
*StrObject

Cheers

Richard
0
Comment
Question by:RichJackson
5 Comments
 
LVL 4

Expert Comment

by:IainHere
ID: 6202469
Here is one link:
http://home.jtan.com/~gregleg/hungarian.html
but there are as many naming conventions as there are programmers - you should find one that you can use (if you're fitting into a team, you won't have much choice).  A web search should throw up plenty.  

I suppose that dw is a DWORD (32 bit unsigned int) and that str is a string.  You really need to look at the declarations to find out.
0
 
LVL 4

Expert Comment

by:captainkirk
ID: 6202802
"sz" and "Str" usually get prefixed to variables that are meant to be strings;

"dw" is for DWORD

Also in (fairly) common use:

"n" for integer
"l" for long
"tag" for a struct
"u"  for unsigned int
"ul" for unsigned long

ets., etc., etc....
0
 
LVL 2

Expert Comment

by:Andrey_Kulik
ID: 6203144
you can extend this convention by using postfix notation

int A(char* szInit_in, DWORD* dwParam_out)

or

CDialog dlgProperty;
HWND dlgProperty_hwnd; // hwnd of this Dialog

and so on

Andrey
0
 
LVL 11

Expert Comment

by:griessh
ID: 6819227
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to refund the points and PAQ at zero points since nobody had a complete answer for you.

The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 6837636
Dormant question will be placed in PAQ.

Regards,
ComTech
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question