Apr 14, 2024 · 7 min read · In game development, you often find that you need to access a certain variable or object from many different places. Things like the score, the player's health, a user-configured setting, and more are frequently needed by many different components th...
Zzgd commented
Dec 30, 2023 · 2 min read · In C programming, the static keyword can be used in different contexts. When static is used at the file level, also known as file scope or global scope, it gives the variable or function "internal linkage." This means that the variable or function is...
Join discussionDec 30, 2023 · 4 min read · Global variables in programming are variables that are defined outside of any function and can be accessed from any part of the code within the same file or, in some cases, from other files as well. Unlike local variables that are created and destroy...
Join discussionDec 30, 2023 · 2 min read · To demonstrate the use of the extern keyword with global variables in C, I'll create a simple example involving two source files. The extern keyword is used to declare a global variable in one file, which is defined in another. This approach allows m...
Join discussionDec 27, 2023 · 3 min read · This article is a summary of Chapter 4.7 of Rust Course (course.rs/) Global Variables Initialized at Compile Time Static Constant Static constants are global constants that can be used anywhere in the program, regardless of the scope in which it is d...
Join discussionOct 16, 2023 · 4 min read · Introduction : A variable is a type of container that stores values. You don't need to declare variables before using them or before declaring their type. Without assigning any values, the variable is completely useless. When we assign any value to a...
Join discussion
Oct 14, 2023 · 2 min read · Function Definition A function is defined using the 'function' keyword similar to JavaScript. function myFun() { echo "Hello World"; } // Output: Hello World myFun(); Default Parameter The parameters in a function can be given a default value wh...
Join discussion