Hi , A Simple Question Why Are Always Define The Functions that are always Either in A Class Or Member of Class Friend to an other Class By A Const Refrence of Square ,
@Vera-tr9nj2 күн бұрын
Hey I have a problem. My maven project is not running. The hello world is not showing in the output. It shows the error that it could not load or find main class. What should I do? Please help I have been stuck on it for months.🙏🙏🙏🙏🙏
@its4theer2 күн бұрын
im so frustrated, everyone says its so we can creat arrays whos size is defined by the user. so why don't we just do { int size; cout<<"size>>"; cin>>size; int array[size]; for(int x:array) cout<<'*'; }
@ProfessorHankStalica2 күн бұрын
static memory is allocated on the stack and only remains available while it is in scope. For example, local variable in a function and once the function finishes executing, the memory is gone. dynamic memory is allocated on the heap and remains until you explicitly free it using delete. So it will persist because it is not bound to scoping rules as static memory is. In other words, if you want to use that array anywhere other than the scope in which it's declared, you can't.
@mba2ceo2 күн бұрын
please no reason to make videos 60 frame rate - 1080p30 is purfact
@ProfessorHankStalica7 сағат бұрын
You are correct. In my later videos, I try to keep it to 720p30 or 1080p30. In my earlier videos I wasn't so good about it. Thanks for the comment.
@mba2ceo6 сағат бұрын
@@ProfessorHankStalica U still the BEST teacher I ever had - any subject :) best wishes
@mba2ceo2 күн бұрын
GOD BLESS U - 100% best teacher I ever had
@nefcodes2 күн бұрын
awesome stuff
@ShivarajappaP-o2g2 күн бұрын
Thank you so much
@ShivarajappaP-o2g3 күн бұрын
Thank you so much for the video, its very clear.
@nefcodes3 күн бұрын
you are a god. seriously underrated channel. the experience you have speaks for itself
@metyx70054 күн бұрын
Thank you so much
@lg7t4 күн бұрын
Amazing Work !!!
@ProfessorHankStalica4 күн бұрын
Thank you! Glad you found it useful!
@user-no9xf5ng4v4 күн бұрын
Why bald guy is always so fantastic af
@ProfessorHankStalica4 күн бұрын
It's the sexual solar panels. 🤔
@Towhid-ze3rw6 күн бұрын
Now this concept is my academic weapon for the OOP theory exam. Loved it
@lg7t7 күн бұрын
professor is there any assignment that would help us in each lesson ? and THANKS FOR YOUR EFFORT
@ProfessorHankStalica7 күн бұрын
Yes, but to see them, you need to be in my class and you are welcome.
@lg7t7 күн бұрын
@@ProfessorHankStalica how is thay possible ?
@elmehdiradouane7 күн бұрын
thank you
@ProfessorHankStalica7 күн бұрын
Welcome!
@duttybwoy55610 күн бұрын
Very good , clear and simple explanation !!! good job... I also saw this line srand(time(NULL)); on top of the main function for this to not generate the same number all the time
@sihammayaba241910 күн бұрын
You are the best. I watched many videos before finding yours. Thank you very much.
@ProfessorHankStalica7 күн бұрын
Glad you like them!
@pamelakunene996211 күн бұрын
great content helps alot in understanding the textbook
@sallaklamhayyen987613 күн бұрын
clear + simple = thank you so much
@ProfessorHankStalica7 күн бұрын
Glad it helped!
@oooook_000013 күн бұрын
hello elliot
@GliderOne-uo2jy18 күн бұрын
So clear for me. Thank you so much Prof!
@ProfessorHankStalica18 күн бұрын
You are welcome!
@freedom421818 күн бұрын
Thank you SO much
@ProfessorHankStalica18 күн бұрын
You're welcome!
@mobina61619 күн бұрын
Where can I check the answers of this book question?
@TheRawi19 күн бұрын
Thanks for this video. I have a question about multiple casting Here is an example: int array[5]{}; array[0] = 1; array[1] = 2; Is it possible to keep the pointer arithmetic here as "int" but assign only a byte? So that "= 1" and "= 2" would be treated as a single byte/char instead of an int.
@ProfessorHankStalica19 күн бұрын
You could store the 1 or 2 in a char variable, or you could use bitwise operators to store 1 in the high byte and 2 in the low byte of an unsigned short, for example.
@TheRawi19 күн бұрын
@@ProfessorHankStalica Thanks for the answer. I tried to assign it to a temporary variable of type char then assign it, the same result; the compiler still treats it as an int and so the other 6 bits are filled with zeros. What worked for me is this: *(char*)(int*)&array[0] = 1; *(char*)(int*)&array[1] = 2; Here the pointer arithmetic is maintained but only a single byte is copied but I'm not sure if this is safe way of doing it.
@ProfessorHankStalica19 күн бұрын
Why not just make an array of chars? char nums[size]; nums[0] = 1; 1 is stored in a single byte then.
@TheRawi18 күн бұрын
@@ProfessorHankStalica Because I'm dealing with different types in the array. It's like a low level memory access like assembly stack where you can store 1 , 2 or 4 bytes.
@ProfessorHankStalica18 күн бұрын
Sounds like you need an array of unions possibly: kzfaq.info/get/bejne/o7GIedtnlZbagmQ.htmlsi=g5Fa7HqLf74RXLo8 union Foo { char c; short s; int i; }; Foo stuff[10]; That would allow you to store 1, 2, or 4 bytes in each element of you array.
@jchdbtcmdddhuryy633222 күн бұрын
Thank so much ❤
@ProfessorHankStalica22 күн бұрын
You're welcome 😊
@akshatagarwal783423 күн бұрын
when i create a new file in a repel it and writes code it shows that main cannot be written again.What should I do
@ProfessorHankStalica23 күн бұрын
Make a new project? You can't have two mains in the same project.
@ramakrishna409223 күн бұрын
// While practicing functions, I encountered an error. Can you explain why? // I tried using `void` as an argument in the function call. // Why can't `void` be used this way, and what is the proper way to call a function that takes no arguments? void myFunction(void) { // Function body } int main() { myFunction(void); // Why is this incorrect? return 0; }
@ProfessorHankStalica23 күн бұрын
void isn't an identifier for any type of argument. The proper way to call a function without passing any arguments is to leave the argument list empty, such as: myFunction(); Function header would be void myFunction() { } Using void as in your example is a C thing and is considered bad practice in C++. Although in the function header in C++ void foo() means basically the same as void foo(void) in C. From what I remember it was a standards decision thing and has to do with how early C was developed way back when, but my memory is fuzzy on that.
@ramakrishna409223 күн бұрын
@@ProfessorHankStalica Thank you so much sir
@joeyaguirre565624 күн бұрын
Professor can you think about it kind of like referencing
@ProfessorHankStalica23 күн бұрын
If you are referring to something like this: a->b->c; or in Java when you do stuff like a.b.c; I suppose you could. Maybe a better way of thinking about it is more like aggregation or the "has-a" relationship.
@RelebohileRamainoane-ob9dl24 күн бұрын
just made things easier thank you very much
@ProfessorHankStalica23 күн бұрын
You're welcome!
@guillaumelacroix443626 күн бұрын
thank you so much for this explanation of pure virtual functions!
@ProfessorHankStalica23 күн бұрын
Glad it was helpful!
@SRPRINZEA29 күн бұрын
Thanks prof!
@ProfessorHankStalica23 күн бұрын
You bet!
@DickNickle29 күн бұрын
I'm more curious. Can you make a series on a simple Pong Game with no graphics engine. Using only Ascii Characters. Is it possible ? I never tried but theory wise. It should be possible. Let you pick the game. Cheers
@lg7t29 күн бұрын
Keep It up Professor
@jessevanhoozer678829 күн бұрын
I'm confused why getting through the loop guarantees a solution. If we take the map coloring example and use two colors, we would get through the loop, since for each pair of nodes, we can always color them differently. However, the map is not two colorable so there is not a solution even though we got through the loop.
@dmark6699Ай бұрын
Great video but the numbers in that vector sound familiar.
@ProfessorHankStalicaАй бұрын
I can't imagine why...
@FatimaSh-ti1usАй бұрын
I am watching your explanation from Jordan. Thank you and I hope you become a Muslim💫💫
@ProfessorHankStalicaАй бұрын
Well thank you for watching and WELCOME! I hope you are well in Jordan! (And I hope you become an atheist ⚛⚛⚛)
@dmark6699Ай бұрын
Python sort function the same.
@ProfessorHankStalicaАй бұрын
Yup. Pretty much.
@dmark6699Ай бұрын
This site looks interesting. Would be better if this was AI powered and would make suggestions after running your code. Then you could compile it for your project to test.
@shadowknocker3034Ай бұрын
It already does, been using it since 2019 😊
@ProfessorHankStalicaАй бұрын
It's cool to have my students use it because it does enough for beginners without a bunch of stuff to get in the way of the more feature rich IDEs.
@ericThursday-zf3zqАй бұрын
First here!
@ProfessorHankStalicaАй бұрын
😊
@ericThursday-zf3zqАй бұрын
second!
@pspsoraАй бұрын
First!
@ProfessorHankStalicaАй бұрын
😂🍻
@dmark6699Ай бұрын
Professor Hank makes it look so easy.
@ProfessorHankStalicaАй бұрын
It is easy. 🙂 Just read your textbook and then write a few programs and you'll get it in not time!
@Program_GamerАй бұрын
Thanks for sharing amazing knowledge....❤👍
@ProfessorHankStalicaАй бұрын
Thanks for liking!
@abdullahsharaawyАй бұрын
Thanks ❤
@bashiraddean-mufarrehАй бұрын
You are wonderful sir... How are you... You are the first reason I love programming in C++... and I want to ask you what is best if you want to make network software. Do I continue with C++ or move to Java or do you have another opinion?
@ProfessorHankStalicaАй бұрын
Thank you for the kind words! As far as which language to move on to, whichever you need based on the needs of your project. Languages aren't rally all that important in the overall scheme of things. If you feel comfortable with C++, then to gain a better understanding of programming and how computers work, then it might be time to start looking at some version of Assembly programming.
@abdullahsharaawyАй бұрын
Thanks ❤
@ProfessorHankStalicaАй бұрын
You're welcome 😊
@bashiraddean-mufarrehАй бұрын
انت رائع سيدي ... كيف حالك ... انت السبب الأول في حبي للبرمجة بلغة C++ ... وأريد أن أسألك ما الأفضل اذا اردت عمل برمجيات شبكية هل استمر في C++ ام انتقل ل Java ام لديك رأي آخر
@Iamyou958Ай бұрын
Thanks
@schwaartzАй бұрын
I CAN'T HEAR YOU (great explanation though)
@ProfessorHankStalicaАй бұрын
I know, the hardware quality I had on earlier videos wasn't so good. Hopefully, you'll notice it's better in later videos.
@sanyuch5606Ай бұрын
what is this applicalion
@ProfessorHankStalicaАй бұрын
Visual Studio Community 2022: kzfaq.info/get/bejne/rctgqKSCndXYfIU.html