Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 481 Bytes

3.AStarSearch.md

File metadata and controls

30 lines (19 loc) · 481 Bytes

Lesson 3: A* Search

Passed by Reference in C++:

Passed by Value:

int MultiplyByTwo(int i) {
    i = 2*i;
    return i;
}

Passed by Reference:

int MultiplyByTwo(int &i) {
    i = 2*i;
    return i;
}

Constants

const: The variable can only be evaluated at run time, but I promise not to change it after it is initialized.

constexpr: The variable can be evaluated at compile time, and I promise not to change it after it is initialized.