The static keyword in C

  Рет қаралды 13,483

Siemens Embedded

Siemens Embedded

7 жыл бұрын

Пікірлер: 26
@Jose_T131
@Jose_T131 2 жыл бұрын
Excellent content, subscribed 🤝
@saturdaysequalsyouth
@saturdaysequalsyouth 4 жыл бұрын
I may have missed it in this video but you can also have static functions in C.
@Embedonix
@Embedonix 7 жыл бұрын
Good points! just a side note to people who might not know! You need to declare the variable as "extern" in a header file to be able to see it in other sources (or translation units).
@joris-rietveld
@joris-rietveld 5 жыл бұрын
Thanks for creating these videos, you are great at explaining stuff.
@emmanuelamoh7181
@emmanuelamoh7181 4 жыл бұрын
Thanks! This explanation was very helpful!
@bobesfanchi
@bobesfanchi 7 жыл бұрын
Good review. Thanks.
@JW-YT
@JW-YT 7 жыл бұрын
Thanks for the darker text, much easier to read...
@nikpapan
@nikpapan 4 жыл бұрын
So, if a class (object instance) has a static variable, do I need to use mutexes when setting/reading its value?
@bobesfanchi
@bobesfanchi 7 жыл бұрын
Can you please do a video explaining the difference between binary semaphore and mutex?
@TheBumi12
@TheBumi12 7 жыл бұрын
binary has only two states, mutex is more like a stack that can go to the negative.
@mingtiantao6928
@mingtiantao6928 5 жыл бұрын
very helpful
@RecycleBin0
@RecycleBin0 5 жыл бұрын
Maybe do a vid on the @ operator in C (i.e absolute address)
@saturdaysequalsyouth
@saturdaysequalsyouth 4 жыл бұрын
There is no @ operator in standard C. Some non-standard C extensions support that feature but exactly how it's used might vary from compiler to compiler so you'll have to consult the documentation of whatever compiler you're using.
@therealaverma
@therealaverma 5 жыл бұрын
what a G great video
@timholstpetersen79
@timholstpetersen79 2 жыл бұрын
Members of classes, both functions and variables that are static have another feature in that they are accessible _without instatiating an object_ of that class. Example: class Test { public: int a; static int b; static void testFunc() {} }; int main() { Test::b = 2; // Ok Test::testFunc(); // Ok Test::a = 1; // ERROR Test *t = new Test(); t->a = 4; // Ok t->b = 6; // Ok t->testFunc(); // Ok std::cout
@mayue6195
@mayue6195 6 жыл бұрын
does static just mean a special global variable but not all functions can access it?
@EmbeddedSoftware
@EmbeddedSoftware 6 жыл бұрын
In effect, yes.
@kolhatkarchinmay
@kolhatkarchinmay 4 жыл бұрын
Is "static" has to do something with "entrant" and "reentrant" function???
@saturdaysequalsyouth
@saturdaysequalsyouth 4 жыл бұрын
No
@sharifahmad6876
@sharifahmad6876 6 жыл бұрын
what is the difference between global and "local to the module".
@EmbeddedSoftware
@EmbeddedSoftware 6 жыл бұрын
A global is accessible to every function in the application. "Local to the module" means accessible to function [below the declaration] in the same file.
@domaincontroller
@domaincontroller 4 жыл бұрын
Would you be nice to let me know which tool and other apps you are using to record this video ?
@carsonholloway
@carsonholloway 4 жыл бұрын
Why are there classes? This is C++, not C.
@neonik6204
@neonik6204 6 жыл бұрын
Is this about java or c programming :(
@EmbeddedSoftware
@EmbeddedSoftware 6 жыл бұрын
The title says it: C.
@jpmorgan187
@jpmorgan187 Жыл бұрын
cool thanks for the good explanation!
the cleanest feature in C that you've probably never heard of
8:13
Low Level Learning
Рет қаралды 130 М.
The Embedded Way - The volatile keyword in C
5:47
Siemens Embedded
Рет қаралды 44 М.
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 50 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 4,5 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 97 МЛН
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 20 МЛН
Becoming an embedded software developer
4:58
Siemens Embedded
Рет қаралды 41 М.
The Static Keyword in C
4:55
Jacob Sorber
Рет қаралды 36 М.
What is a static variable?
4:45
CodeVault
Рет қаралды 40 М.
Header files and libraries (Kevin Lynch)
9:32
Northwestern Robotics
Рет қаралды 93 М.
The Most Useless Keyword in C?
10:26
Jacob Sorber
Рет қаралды 68 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,1 МЛН
Static Local Variables | C Programming Tutorial
6:17
Portfolio Courses
Рет қаралды 8 М.
Weird Parts of C you probably never heard of...
38:06
Tsoding Daily
Рет қаралды 55 М.
How to use the volatile keyword in C?
6:48
Jacob Sorber
Рет қаралды 68 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,6 МЛН
НЕ ПОКУПАЙ СМАРТФОН, ПОКА НЕ УЗНАЕШЬ ЭТО! Не ошибись с выбором…
15:23
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Кинг Комп Shorts
Рет қаралды 1,7 МЛН
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 2,4 МЛН