Похожие чаты

What is the difference between two class ?

18 ответов

7 просмотров
ali- Автор вопроса
ali- Автор вопроса

Nothing.

ali- Автор вопроса
Ghasem Ramezani
Nothing.

when we must using default keyword?

ali
when we must using default keyword?

When you want to compiler creates that for you, some situations like when you explicitly defined a constructor with parameters, but you want to have the default constructor as well.

ali
screenshot thanks

I said 'when you want to compiler creates that for you', how do you expect the compiler know that how to deal with the constructor parameter?

ali
screenshot thanks

= default can be applied only for those constructors that can be automatically generated (default constructor, copy constructor, move constructor) Also to destructor and assignment operators (afaik).

Pavel
= default can be applied only for those constructo...

I believe that Scott Mayer explained default very well in Effective Modern C++ items, but i can't find it.

ali- Автор вопроса
ali
ok what difference between this two

Again, Nothing. In the second one you just explicitly ask the compiler to generate the default constructor for you.

ali
thanks

What resource do you follow for learning C++ programming?

ali- Автор вопроса
ali
google and telegram

Oh, why? why not just The C++ Programming Language by Bjarne Stroustrup? or if you don't know enough about programming: https://www.stroustrup.com/programming.html

Prince Of Persia [field = CE,DM = BLOCK]
I do use C++ Primer and it's really good

I don't know about it, but the Bjarne books are really lovely 😂.

Ghasem Ramezani
I don't know about it, but the Bjarne books are re...

😁👍i follow him in youtube but in the books i may follow for reference

Похожие вопросы

Обсуждают сегодня

Anyone here suffers from unexplained aural migraines, who would be up for talking for a bit? Doesn't *have* to be aural, but I am not asking about headaches, I mean actual mi...
Martin Rys
55
Сonst magicTgHTML = (text, entities) => { let processedText = text; let offsetShift = 0; entities.forEach(entity => { const { offset, length, type, url, ...
Андрей
1
A couple thoughts from a random internet stranger: 1. If you want this project to gain traction you cannot keep being negative. If I just came here after finding out about Kd...
Eric Wild
45
Здравствуйте товарищи! решил всё таки поставить линукс. Порядок создание разделов /boot/efi 200МиБ; /boot 1000; подсистему / 80000; swap 8Гб Будет норм?
K2
19
How Will #Monero Be Attacked? First of all I want to tell you that this is not teaching the network attackers, the central regulators. They already know how to attack the net...
Li₿ΞʁLiøη
3
подскажите пожалуйста, как мне освободить результат записанный в переменную result? в чем проблема подскажите если МОЖЕТЕ?
Михаил Helper
28
we need to look at what power and capital monopolies are seeking to prevent or control in order to understand why it is important to keep building right now. the elites are go...
Noah
1
есть тут кто-то , кто только начал изучать си? если проходите курс на степике или как-то сами изучаете, пишите, может, скооперируемся?..
Eule
25
Слушайте, ещё такая интересная задачка. Сделан аудит действий пользователей через триггеры в базе, соответственно каждый пользователь имеет свой логин и пароль в базе. Это пре...
Сергей Бычков
12
Скажите, тут нет проблемы? IMyInterface1 = interface function GetInterface2: IInterface2; ... function TMyInterface.GetInterface2: IInterface2; begin Result := TI...
Ruslan aka DUDE
18
Карта сайта