Solved

Varible Naming Conventions

Posted on 2001-06-18
5
202 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now