-
2019.05.06
Dynamic Memory (동적 메모리)
Static & Dynamic Memory To be successful as a C++ programmer, it's essential to have a good understanding of how dynamic memory works. In a C++ program, memory is divided into two parts: The stack: All of your local variables take up memory from the stack. The heap: Unused program memory that can be used when the program runs to dynamically allocate the memory. Many times, you are not aware in a..
-
2019.05.06
Pointers (포인터)
Pointers Every variable is a memory location, which has its address defined. That address can be accessed using the ampersand (&) operator (also called the address-of operator), which denotes an address in memory. For example:int score = 5; cout
-
2019.05.06
Naming Rules for Variables (변수 이름 생성 규칙)
*Naming Rules for Variables (변수 이름 생성 규칙) The names of variables in the C++ language are referred to as identifiers. The best naming convention is to choose a variable name that will tell the reader of the program what the variable represents. Variables that describe the data stored at that particular memory location are called mnemonic variables. Rules for naming variables: (1) Variable names i..