R Rackham Baseband Member Messages 21 Feb 5, 2005 #1 Im just beginning to learn C++ and I am having trouble understanding why the variables in many sample source codes begin with a letter such as n or d. Such as int nVariable Any help would be appreciated thanks
Im just beginning to learn C++ and I am having trouble understanding why the variables in many sample source codes begin with a letter such as n or d. Such as int nVariable Any help would be appreciated thanks
T Tulsileaf Daemon Poster Messages 1,249 Feb 7, 2005 #2 because the programmers chose to name them that way. When naming a variable its important to choose a name following to rules: 1) when you see the name, you know instantly what the variable is for. 2) names should not conflict (e.g. int hey; char hey namespace solves this problem. so i suppose that the name nVariable should remind the coder that nVariable is an integer that will be used for whatever purpose. Sometimes there are guidelines set up on choosing names. See whomever is responsible for the source and ask what these guidelines are, if they exist.
because the programmers chose to name them that way. When naming a variable its important to choose a name following to rules: 1) when you see the name, you know instantly what the variable is for. 2) names should not conflict (e.g. int hey; char hey namespace solves this problem. so i suppose that the name nVariable should remind the coder that nVariable is an integer that will be used for whatever purpose. Sometimes there are guidelines set up on choosing names. See whomever is responsible for the source and ask what these guidelines are, if they exist.