Your videos are like masala chai! Refreshing and insightful!
@MikeShah Жыл бұрын
Hehe cheers!
@sanjaygatne1424 Жыл бұрын
your videos are just awesome. makes the stuff easy to understand.
@MikeShah Жыл бұрын
Cheers!
@qcnck2776 Жыл бұрын
Thanks. Looking forward to more C++ vids
@MikeShah Жыл бұрын
Cheers, more coming!
@monty6393 Жыл бұрын
Thanks mike for the video..
@MikeShah Жыл бұрын
Cheers!
@bffever8803 Жыл бұрын
your video is amazing ,i love it
@MikeShah Жыл бұрын
Cheers!
@nicksklenicka8926 Жыл бұрын
Much appreciated.
@MikeShah Жыл бұрын
Cheers!
@Byynx Жыл бұрын
Hi can you explain why we can declare the var "static int SomeValue" and then write "int Struct::SomeValue=63" with the same syntax as if we were creating a variable? And is it because the compiler knows "SomeValue" var has to be initialized that the linker trys to find that initialilization in each source file and that's why it executes the line "int Struct::SomeValue=63" from "Struct.cpp" file?
@MikeShah Жыл бұрын
Struct::SomeValue is part of the scope (Struct:: that is). For static variables, you typically declare in the implementation (.cpp file) the value to build the symbol.
@RobBCactive Жыл бұрын
This could have been clearer, an example the main.c variable Struct s isn't apparently used and struct Struct with one member, is not concretely useful. Fundamentally the hpp file attempts to both declare the type and an instance of it, allocating static memory, while consts are replicatable compile time values so implicitly non-extern non global (not lvalues). When Struct.cpp was used static is meaninglessly contradictory as it wasn't in a function scope and it wasn't a file variable. How on earth is this cleaner? It just looks like hacking an erroneous data concept until it compiles. A hint is the compiler error message reminding that it considers Struct a class.