Thread: Terminology

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    61

    Terminology

    I read in one of my last threads that for example pNode is commonly used to denote a pointer (the p part).

    Is "n" used for anything, reason i'm asking is i've been given a piece of code to develop. It compiles and everything so its not fundamental to it working i just wondered if it meant anything.

    Thanks

    James

  2. #2
    Rat with a C++ compiler Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    Location
    ntdll.dll
    Posts
    203
    I use n to to represent an iNteger.
    Code:
    int nBullets = 35;
    c = class, m_ = class member
    There's a term for this type of organization but I don't remember. Someone'll get on it.
    How to ask smart questions
    Code:
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};
    WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesOverwritten);

  3. #3
    Registered User
    Join Date
    Nov 2011
    Posts
    61
    thanks makes sense, i was just wondering as its used loads in the code i got lol

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    You may want to read up on hungarian notation which is one form of prefixing variables. It's the most common, but not the only convention.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  5. #5
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by r_james14 View Post
    I read in one of my last threads that for example pNode is commonly used to denote a pointer (the p part).

    Is "n" used for anything, reason i'm asking is i've been given a piece of code to develop. It compiles and everything so its not fundamental to it working i just wondered if it meant anything.

    Thanks

    James
    It is meaningful only in that people give it meaning... That is, the compiler doesn't care about it, it's just a prefixing convention used as a reminder to the programmer who has to update it later on.

    Think about the code you write today. Will you still be able to follow it 5 years from now?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. terminology
    By h_howee in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 05-04-2007, 09:36 PM
  2. Deadlock - graph/edge/cycle - help with terminology
    By patricio2626 in forum C++ Programming
    Replies: 4
    Last Post: 11-24-2006, 04:22 PM
  3. Thinking about terminology
    By SlyMaelstrom in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 02-25-2006, 07:42 AM
  4. Pointer Terminology Question
    By SourceCode in forum C Programming
    Replies: 2
    Last Post: 03-07-2003, 09:11 AM
  5. Error in terminology in Code Journal
    By SilentStrike in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-23-2002, 11:04 AM