Scribe
Scribe

Gostou? Torne o Scribe ainda melhor deixando uma avaliação

Obter Extensão do Chrome

Navegar

  • Vídeos Populares
  • Vídeos Recentes
  • Todos os Canais

Ferramentas Gratuitas

  • Baixador de Legendas de Vídeo
  • Gerador de Marcadores de Tempo de Vídeo
  • Resumidor de Vídeos
  • Contador de Palavras de Vídeo
  • Analisador de Títulos de Vídeo
  • Busca de Transcrições de Vídeo
  • Análises de Vídeo
  • Criador de Capítulos de Vídeo
  • Gerador de Quiz de Vídeo
  • Chat com Vídeo

Produto

  • Preços
  • Blog
  • Obter Extensão do Chrome

Developers

  • Transcript API
  • API Documentation

Legal

  • Termos
  • Privacidade
  • Suporte
  • Mapa do Site

Direitos Autorais © 2026. Feito com ♥ por Scribe

— Se isso tornou sua vida mais fácil (ou pelo menos um pouco menos caótica), deixe-nos uma avaliação! Prometemos que vai alegrar nosso dia. 😊

Related Videos

C CONSTRUCTOR OVERLOADING explained easy 👨‍🍳

Video thumbnail
9.49k572 Palavras2m readGrade 18
Compartilhar
Channel
Bro Code
overloaded constructors are when we have multiple constructors with the same name but different parameters they allow for a varying number of arguments when instantiating an object here's an example we'll create pizza objects from a pizza class let's type class pizza add a set of curly braces a semicolon to the end we'll make our members publicly accessible so pizzas they can have a variable number of toppings right you can have no toppings one topping two toppings three toppings suppose we have just one topping to begin with topping one and that will be of the string data
type standard string topping one then i will create a pizza constructor it has the same name as the class name pizza parentheses curly braces we'll set up some parameters standard string topping one in order to construct a pizza we have to pass in one topping so let's do that we have pizza pizza one and i will pass in one argument for a topping i feel like pepperoni then we'll just need to assign this argument to this attribute this arrow topping one equals topping one the name of this parameter then to test this let's display topping
one standard pizza one dot topping one okay we have pizza one that contains pepperoni now what if you would like a pizza that has two toppings suppose we have pizza two pizza pizza two this time i'm going to attempt to pass in two arguments how about mushrooms and peppers well when i run this program we're going to have an error error no matching function for call to pizza with two arguments we can create an additional constructor that accepts different arguments let's copy what we have and paste it this constructor will take two string arguments topping
one and topping two so we have two toppings this time and i should probably create another attribute for a second topping standard string topping two this topping two equals topping two so now with pizza two let's display topping one as well as topping two now pizza 2 contains mushrooms and peppers what if you would like a pizza with no toppings like a plain cheese pizza well we could set that up pizza pizza three i'm going to attempt to add a set of parentheses after pizza 3 but pass in no arguments but we have a warning
our compiler is saying we should get rid of the parentheses if we're passing in no arguments we don't need that set of parentheses but we still have an error here no matching function call for pizza with no arguments if we're creating an object and passing in no arguments we'll need a matching constructor so at the top i'll create a pizza constructor with no arguments and that should make that error go away so this should run and compile just fine then yep no errors so yeah those are overloaded constructors you can have multiple constructors with the
same name as long as the parameters are different we have three constructors with the same name we can create a pizza with no toppings one topping or two toppings overloaded constructors allow for multiple objects with a varying number of attributes if you're looking for some additional exercises post a class with overloaded constructors in the comments section down below and well yeah those are overloaded constructors in c plus plus
Vídeos relacionados
C++ GETTERS & SETTERS explained easy 🔒
6:12
C++ GETTERS & SETTERS explained easy 🔒
Bro Code
15,274 views
C++ CONSTRUCTORS explained easy 👷
8:55
C++ CONSTRUCTORS explained easy 👷
Bro Code
25,049 views
C++ TIC TAC TOE game for beginners ⭕
19:09
C++ TIC TAC TOE game for beginners ⭕
Bro Code
29,812 views
Coding Was HARD Until I Learned These 5 Things...
8:34
Coding Was HARD Until I Learned These 5 Th...
Elsa Scola
688,556 views
Learn C# Programming – Full Course with Mini-Projects
8:17:11
Learn C# Programming – Full Course with Mi...
freeCodeCamp.org
501,370 views
C# Constructors Tutorial | Mosh
23:24
C# Constructors Tutorial | Mosh
Programming with Mosh
239,874 views
Object Oriented Programming (OOP) in C++ Course
1:30:26
Object Oriented Programming (OOP) in C++ C...
freeCodeCamp.org
2,639,543 views
OPERATORS and OPERATOR OVERLOADING in C++
12:44
OPERATORS and OPERATOR OVERLOADING in C++
The Cherno
381,311 views
Crackling Fireplace & Smooth Jazz Instrumental 🍂 Warm Jazz Music at Cozy Fall Coffee Shop Ambience
Crackling Fireplace & Smooth Jazz Instrume...
Relax Jazz Cafe
C++ arrays explained 🚗
5:29
C++ arrays explained 🚗
Bro Code
28,544 views
Constructors And Destructors In C++ | Constructors In C++ | C++ Tutorial For Beginners | Simplilearn
30:52
Constructors And Destructors In C++ | Cons...
Simplilearn
81,121 views
31 nooby C++ habits you need to ditch
16:18
31 nooby C++ habits you need to ditch
mCoding
825,967 views
C++ Operator Overloading beginner to advanced (in-depth explanation)
35:19
C++ Operator Overloading beginner to advan...
CodeBeauty
268,730 views
C++ recursion explained easy 😵
6:21
C++ recursion explained easy 😵
Bro Code
15,805 views
how Google writes gorgeous C++
7:40
how Google writes gorgeous C++
Low Level
952,170 views
My 10 “Clean” Code Principles (Start These Now)
15:12
My 10 “Clean” Code Principles (Start These...
Conner Ardman
284,211 views
C++ CLASSES & OBJECTS explained easy 🧍
10:54
C++ CLASSES & OBJECTS explained easy 🧍
Bro Code
32,851 views
How C++ Works
20:21
How C++ Works
The Cherno
1,124,991 views
Operator Overloading Introduction | C++ Tutorial
8:01
Operator Overloading Introduction | C++ Tu...
Portfolio Courses
16,593 views