Тёмный

Public And Private Access Specifiers | C++ Tutorial 

Portfolio Courses
Подписаться 177 тыс.
Просмотров 33 тыс.
50% 1

The difference between public and private access modifiers in C++ classes is discussed with an example. Source code: github.com/portfoliocourses/c.... Check out www.portfoliocourses.com to build a portfolio that will impress employers!

Хобби

Опубликовано:

 

9 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 63   
@maxg4958
@maxg4958 21 день назад
Dang, your courses are so underrated, yet so helpful... and today's views of 31k is not matched by lousy 876 likes. C'mon people, don't just watch, pay your dues and hit the like button for these no fuzz and straight to the point tutorials.
@GabrielVillanueva-uw2sj
@GabrielVillanueva-uw2sj 6 дней назад
Brilliant explanation! This video took 8 mins to explain something I struggled to understand!
@mkk9211
@mkk9211 11 месяцев назад
i have 3 hours to my final exam. your channel has helped me a lot so far, thank you ❤️ ps: text based AI LMs still can't explain topics better than humans
@PortfolioCourses
@PortfolioCourses 11 месяцев назад
You're very welcome, I'm so glad to hear the channel helped you out! :-) And I'm glad to hear humans are still winning the race against the machines, at least for now. :-P
@ecmuppet9538
@ecmuppet9538 Месяц назад
How did the final exam go?
@suvojitdas2240
@suvojitdas2240 Год назад
Omg...Sir thank you for helping me out of this topic......You actually saved me and cleared all my doubts....A new sub .....Thanks Sir
@PortfolioCourses
@PortfolioCourses Год назад
You're welcome, I'm glad that the video helped you out! :-) And welcome aboard!
@moonchild7597
@moonchild7597 2 года назад
7:07 this is all I needed to know. I missed the lecture a few days ago and this helped alot, so thanks ;)
@PortfolioCourses
@PortfolioCourses 2 года назад
You're welcome! 🙂
@mattmjlg5053
@mattmjlg5053 Год назад
Through but simple and to the point subscribed
@PortfolioCourses
@PortfolioCourses Год назад
Thank you Matt, welcome aboard! :-)
@hussein2698
@hussein2698 2 года назад
Great video, well done.
@PortfolioCourses
@PortfolioCourses 2 года назад
Thank you Hussein! 😀
@drewdwyer6875
@drewdwyer6875 2 месяца назад
Thank you for all of your helpful videos. Also would like to say its nice to find a Canadian creator -- (if you are canadian! I have a similar accent). Keep doing what you're doing and thanks again.
@PortfolioCourses
@PortfolioCourses 2 месяца назад
You're welcome, I'm glad you find them helpful! :-) And haha yes, I'm Canadian. That's funny that you could tell by the accent, I never really think of myself as having an accent but I suppose we all do.
@user-yr9sn1kt7u
@user-yr9sn1kt7u Месяц назад
you are amazing in teaching and explaining are you sure you are not a teacher? thank you very much.
@dioutoroo
@dioutoroo 11 месяцев назад
Hi! Thank you for the lecture !!
@PortfolioCourses
@PortfolioCourses 11 месяцев назад
You’re very welcome! :-)
@ab-fm4xj
@ab-fm4xj 4 месяца назад
can i just say: fck me. finally someone explaining it well. i am follwoing many c++ tutor and i dropped the ball with all their explanation. especially because fk knows why they are using nonsensical variable and class names when it is crutial to be clean and straightforward when one is just learning a new skill. so thank you for that. i am superglad i found this channel.
@Heelo_0
@Heelo_0 2 года назад
betta than tha lecture I attended much love and thanks to you
@PortfolioCourses
@PortfolioCourses 2 года назад
Haha I'm glad to hear it helped you, and you're welcome! 😀
@rjoshi.5182
@rjoshi.5182 2 года назад
Great video!!
@PortfolioCourses
@PortfolioCourses 2 года назад
Thank you for the kind feedback Rjoshi! 😀
@sonukumarnirala6896
@sonukumarnirala6896 3 месяца назад
Very helpful your lecture. Thanks
@PortfolioCourses
@PortfolioCourses 3 месяца назад
You're welcome! :-)
@Morning_Rays
@Morning_Rays 2 года назад
Excellent 👌
@PortfolioCourses
@PortfolioCourses 2 года назад
Thank you Aman! I’m glad to hear you enjoyed the video. :-)
@putuadibrata
@putuadibrata 5 месяцев назад
Thanks Masbro
@arlynnarito6947
@arlynnarito6947 Год назад
thank you so much sir...
@PortfolioCourses
@PortfolioCourses Год назад
You're very welcome Arlyn! :-)
@MilosMoravec-jg4dn
@MilosMoravec-jg4dn 2 месяца назад
Is class and struct the same thing in C++? Also, do you plan on recording any videos for OOP?
@chaoukimachreki6422
@chaoukimachreki6422 3 месяца назад
Well explained, but i would add why do we even use it ? In which cases ? Why just not use const if i am intending not to make changes in it ? Real world reasons why i would choose to make some functions or variables private.
@bryant122
@bryant122 2 года назад
Great!
@PortfolioCourses
@PortfolioCourses 2 года назад
Thank you! :-)
@kutulloinnocentmoropane502
@kutulloinnocentmoropane502 6 месяцев назад
How can I access data member of parent class inside a child class
@vanlalchaka
@vanlalchaka Год назад
What software were you using for writing and executing the codes, sir? Can you share the download link with me please?
@PortfolioCourses
@PortfolioCourses Год назад
In this video I am using Xcode, which is available free on a Mac: developer.apple.com/xcode/. On Windows, Visual Studio is pretty good: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWPlRubVQ38.html. :-D
@vanlalchaka
@vanlalchaka Год назад
@@PortfolioCourses Thank you so much, Sir... I really appreciate your help..
@PortfolioCourses
@PortfolioCourses Год назад
No problem, and you’re welcome! :-)
@jamestanny849
@jamestanny849 7 месяцев назад
I have difficulties understanding the need for getters and setters, because if you can access it anyway in the public section then it (for me) seems exactly the same as simply just having the salary in the public section? How can this method be more secure if you can set salary and get salary from public? 4:20
@PortfolioCourses
@PortfolioCourses 7 месяцев назад
The idea is that getters and setters can do things with the data before getting and setting. So maybe before setting a value, the setter can ensure the value is within a valid range. And maybe before returning the data, the getter can convert the format of the data. The exact usefulness of getters and setters is something that is debated by people though, so you're right to question it. :-)
@azizahmed4220
@azizahmed4220 2 года назад
thx
@PortfolioCourses
@PortfolioCourses 2 года назад
You're welcome Aziz! 🙂
@calebbarrerareny9003
@calebbarrerareny9003 Год назад
So for every private it needs something in the public to run?
@PortfolioCourses
@PortfolioCourses Год назад
Great question Caleb! :-) If we want to give access to private members, we can use public members to do so, but it’s not a requirement that we do this. Sometimes it’s useful to have members that are private without giving access to them through public members, for things the class needs to use “internally” but not expose to the “outside world”.
@calebbarrerareny9003
@calebbarrerareny9003 Год назад
@@PortfolioCourses I see thanks for the fast reply!
@PortfolioCourses
@PortfolioCourses Год назад
You’re welcome! :-)
@omgitzisrael
@omgitzisrael 11 месяцев назад
What ide do you use?
@PortfolioCourses
@PortfolioCourses 11 месяцев назад
I use Xcode on a Mac. :-)
@omgitzisrael
@omgitzisrael 11 месяцев назад
@@PortfolioCourses can I get it on Windows?
@PortfolioCourses
@PortfolioCourses 11 месяцев назад
I don't think so. On Windows people often use Visual Studio for C++: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qWPlRubVQ38.html. :-)
@akashislam9127
@akashislam9127 Год назад
dose a class has no scope?
@PortfolioCourses
@PortfolioCourses Год назад
Great question Akash! This answer here talks about classes and scopes: stackoverflow.com/questions/55092387/what-is-the-scope-of-a-class-declaration-in-c. :-) If you want to learn more about namespaces they are covered in this video here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0EtnWcRild4.html.
@DELLITHGENERATION
@DELLITHGENERATION Год назад
sir what is the name of the compilar?
@PortfolioCourses
@PortfolioCourses Год назад
In this video I am using Xcode on a Mac computer. :-)
@DELLITHGENERATION
@DELLITHGENERATION Год назад
​@@PortfolioCourses Sir can i download it on laptop? if yes then can you please let me know how to download it?
@PortfolioCourses
@PortfolioCourses Год назад
You need a Mac to use Xcode, the page for it is here: developer.apple.com/xcode/. :-)
@imcareca
@imcareca 2 года назад
What are u using to code? 🤔
@imcareca
@imcareca 2 года назад
Btw great video, gonna have an exam right now and it saved me
@PortfolioCourses
@PortfolioCourses 2 года назад
In this video I'm using Xcode on Mac. I have it setup so that really only a large code window displays, the default setup doesn't look like this.
@PortfolioCourses
@PortfolioCourses 2 года назад
I’m glad to hear it was helpful for you, and good luck on your exam! :-)
@yigitcoban9823
@yigitcoban9823 Год назад
There is no question to be asked.
@PortfolioCourses
@PortfolioCourses Год назад
Cool! :-)
Далее
Class Member Functions (aka Methods) | C++ Tutorial
7:18
Constructor Basics | C++ Tutorial
7:08
Просмотров 18 тыс.
Is C++ better than C?
1:46:10
Просмотров 37 тыс.
Introduction To Classes And Objects | C++ Tutorial
11:49
Class Templates | C++ Tutorial
12:48
Просмотров 42 тыс.
the TRUTH about C++ (is it worth your time?)
3:17
Просмотров 602 тыс.
#40 Encapsulation in Java
11:42
Просмотров 133 тыс.
this Keyword And Use Cases Explained | C++ Tutorial
10:30
Я на проекте «холостяк»😂
0:20
Просмотров 721 тыс.
Sprinting with More and More Money
0:29
Просмотров 162 млн