C++ Create Your Own Class Header Files [2]

  Рет қаралды 12,764

Professor Hank Stalica

Professor Hank Stalica

Күн бұрын

Пікірлер: 38
@eduardogallegos9
@eduardogallegos9 Жыл бұрын
You are an amazing teacher. Thank you! I wish you were my professor
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
Who am I to argue with someone with such obvious intelligence?
@errik96
@errik96 Жыл бұрын
Me too!! Very easy to understand and speaks very clearly!!@@ProfessorHankStalica
@riotfist9747
@riotfist9747 Жыл бұрын
thank you for explaing macros in a proper manner
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
Glad it was helpful!
@mr.shredder5430
@mr.shredder5430 Жыл бұрын
thanks for making this tutorial it help me alot, i hope others may benefit from it, its a lot to learn i hope you keep teaching 💜💜
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
Glad it was helpful!
@MrMichalXXL
@MrMichalXXL Жыл бұрын
What a great video. It helped a lot
@dariusz4434
@dariusz4434 4 ай бұрын
'#pragma once' is not limited to Windows compilers and is supported by most modern C++ compilers across different platforms. Supported Compilers: GCC (GNU Compiler Collection): Fully supports '#pragma once' Clang: Fully supports '#pragma once' MSVC (Microsoft Visual C++): Fully supports '#pragma once' Intel C++ Compiler: Supports '#pragma once' Apple's Xcode (using Clang): Supports '#pragma once'
@ProfessorHankStalica
@ProfessorHankStalica 4 ай бұрын
Supported, but not standard and not always reliable. en.wikipedia.org/wiki/Pragma_once en.cppreference.com/w/cpp/preprocessor/impl #ifndef, #define, #endif works 100% of the time all of the time.
@whoziee
@whoziee 9 ай бұрын
Great stuff 🙂
@sayanhalder6470
@sayanhalder6470 Жыл бұрын
Sir one question, sir instead of making two different files that is specification and implementation can we make one that is only the rectangle.cpp and add just that in the main. cpp? What will be the differences in this case and can we use the same logic of preprocessors that we used in the rectangle.h in this case? I mean to say everything including the class and member function definitions in the rectangle.cpp and only including this in the main file and not create the rectangle.h at all?
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
You absolutely could. Just throw everything into a .h file and #include that. It's purely preference and how close to some standards you want to follow.
@sayanhalder6470
@sayanhalder6470 Жыл бұрын
​@@ProfessorHankStalicasir dp u have a vdo on iostream file, the stream concept is very complex for me and specily the > operator. I have problems specifically when we use the operaror overloading comcept with the extractipn operaror where we treat the cout as an operand and object along with ostream as the class. I have problems regarding the iostream classes and understanding the objects of them specifically
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
@@sayanhalder6470 I think this might be what you are looking for: kzbin.info/www/bejne/j3msZquXos6bm6M Don't forget that KZbin channels have a search function. Go to the channel landing page www.youtube.com/@ProfessorHankStalica and next to the About link is an hour glass. Click that and you can search the channel for whatever you are interested in. You can also click the Playlists link to scan through that too.
@callmegary2622
@callmegary2622 10 ай бұрын
@@ProfessorHankStalica ah Thanks!! i was looking for this. I was wandering if I could declare and define all in the header file.
@AsmmaaMAhHmmeed
@AsmmaaMAhHmmeed Жыл бұрын
Thank you so much ❤❤❤❤❤❤❤
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
You're welcome 😊
@daudimwenyewe7372
@daudimwenyewe7372 10 ай бұрын
Really great video
@ProfessorHankStalica
@ProfessorHankStalica 10 ай бұрын
Thanks!
@alexandruteodor3585
@alexandruteodor3585 Жыл бұрын
Hello, professor Hank! I'm a little confused why does it have to be this way in C++, implementation and specification files. To me, it would make more sense to have a class in a file altogether and import that in the main file.
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
It doesn't have to be this way. You could put them all in the same header file, but this is an option and common practice.
@lg7t
@lg7t 6 ай бұрын
professor is there any assignment that would help us in each lesson ? and THANKS FOR YOUR EFFORT
@ProfessorHankStalica
@ProfessorHankStalica 6 ай бұрын
Yes, but to see them, you need to be in my class and you are welcome.
@lg7t
@lg7t 6 ай бұрын
@@ProfessorHankStalica how is thay possible ?
@ziyad7780
@ziyad7780 Жыл бұрын
Thank you so much!!
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
You. Are. Welcome. So. Much. ❤
@emilioramirez010
@emilioramirez010 7 ай бұрын
After creating a header file, what is the best way to use it in another project? Do I just need to create a new header file and copy and paste the code over each time?
@ProfessorHankStalica
@ProfessorHankStalica 20 күн бұрын
No, you place it in a folder that's in the path for your IDE and then you can just #include "yourheader.h"
@nazareno.marcelli
@nazareno.marcelli Жыл бұрын
Thank you!
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
You're welcome!
@PoetryInMotion946
@PoetryInMotion946 4 ай бұрын
You must be good with the ladies the way you clearly explain things🧑‍💻
@ProfessorHankStalica
@ProfessorHankStalica 12 күн бұрын
Oh yeah. You should hear me explain virtual functions in my Isaac Hayes voice. Gets 'em every time.
@boudalaakhadija7523
@boudalaakhadija7523 8 ай бұрын
hello professor how to run this on Visual Studio thank you.
@ProfessorHankStalica
@ProfessorHankStalica 8 ай бұрын
Hi, not sure I understand the question since I use Visual Studio in the video.
@AozenDreyar
@AozenDreyar 11 ай бұрын
thank you!
@ProfessorHankStalica
@ProfessorHankStalica 11 ай бұрын
You're welcome!
@callmegary2622
@callmegary2622 10 ай бұрын
great
C++ inline member functions for classes [3]
6:12
Professor Hank Stalica
Рет қаралды 4,3 М.
What are header files in C++ ( PROGRAMMING TUTORIAL for beginners)
23:54
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН
C++ Header Files
15:10
The Cherno
Рет қаралды 744 М.
C++ Introduction to classes [1]
13:17
Professor Hank Stalica
Рет қаралды 4,8 М.
BETTER Header Files and Preprocessor Debugging
24:26
The Cherno
Рет қаралды 75 М.
Header & Implementation File for C++ Classes | C++ Tutorial
7:34
C++ Beginner's Tutorial:  Create Your Own Header Files using Visual Studio
15:49
Professor Hank Stalica
Рет қаралды 41 М.
why do header files even exist?
10:53
Low Level
Рет қаралды 447 М.
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 299 М.
Let's Create a Compiler (Pt.1)
1:11:03
Pixeled
Рет қаралды 590 М.
Multiple Files in C (Header and Source Files)
26:07
Jonathan Muckell
Рет қаралды 19 М.
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН