Solved

Varible Naming Conventions

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

813 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

9 Experts available now in Live!

Get 1:1 Help Now