What does void mean in C, C++, and C#?

Basically it means “nothing” or “no type” There are 3 basic ways that void is used: Function argument: int myFunc(void) — the function takes nothing. Function return value: void myFunc(int) — the function returns nothing Generic data pointer: void* data — ‘data’ is a pointer to data of unknown type, and cannot be dereferenced Note: … Read more

What does “Memory allocated at compile time” really mean?

Memory allocated at compile-time means the compiler resolves at compile-time where certain things will be allocated inside the process memory map. For example, consider a global array: int array[100]; The compiler knows at compile-time the size of the array and the size of an int, so it knows the entire size of the array at … Read more

What is a Shim?

Simple Explanation via Cartoon An example of a shim: Summary A shim is some code that takes care of what’s asked (by ‘interception’), without anyone being any wiser about it. Example of a Shim An example of a shim would be rbenv (a neat ruby tool). Calls to ruby commands are “shimmed”. i.e. when you … Read more

Difference between an API and SDK

Piece of cake: an API is an interface. It’s like the specification of the telephone system or the electrical wiring in your house. Anything* can use it as long as it knows how to interface. You can even buy off-the-shelf software to use a particular API, just as you can buy off the shelf telephone … Read more

The term “Context” in programming? [closed]

Let’s say you go to the dentist to have a tooth pulled out. When the receptionist asks you for your name, that’s information they need in order to begin the appointment. In this example, your name is contextual information. So in the context of visiting the dentist, you need to provide your name to get … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)