Thread: WDL in the wild
View Single Post
Old 10-20-2014, 10:13 AM   #107
Human being with feelings
Tale's Avatar
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,929

Originally Posted by Argitoth View Post
There is 'k' and 'm' at the beginning of many variables. What do they represent?
The m for member variable, the k for constant (I think). Sometimes you will also see g for global, s for static, and e for enumerator. These prefixes are used to distinguish beteen normal (local) variables, and member/global/static variables or constants/enumerators. Note that you don't have to use these prefixes, but it is considered good practice.

class MyClass

	int mY;

	void Square(int x)
		int y = x*x;
		mY = y;
Tale is offline   Reply With Quote