#include class Car{ public: std::string make; std::string model; int year; std::string color; Car(std::string make, std::string model, int year, std::string color){ this->make = make; this->model = model; this->year = year; this->color = color; } }; int main() { //constructor = special method that is automatically called when an object is instantiated // useful for assigning values to attributes as arguments Car car1("Chevy", "Corvette", 2022, "blue"); Car car2("Ford", "Mustang", 2023, "red"); std::cout
@lv32344 ай бұрын
am i tripping? why is this comment 1 year old but the video was posted 2 weeks ago
@draftofspasiba23 ай бұрын
@@lv3234the video was unlisted/private before, after you make it public it will then set a new video date, except for comments.
@esraafadul29293 ай бұрын
can you make a vid about the destructors as well 😔, ty
@misaelsandoval75422 жыл бұрын
Great video!
@DetCoAnimeFan2 жыл бұрын
Great!
@HunaBopa Жыл бұрын
Great lesson.
@artemzakharchuk284211 ай бұрын
Great lesson❤❤❤ Broooo...🎉🎉🎉
@shadmankhan19692 жыл бұрын
thx bro
@shervin95619 ай бұрын
Thanks
@AozenDreyar8 ай бұрын
thank you
@AnantaAkash.Podder2 ай бұрын
Thank you sir😃
@Dazza_Doo Жыл бұрын
Wow another thing C++ does better than C# Why do I say that? C++ () standard brackets C# {} used in a new constructor
@samsrec60604 ай бұрын
Create tutorial for golang
@gamsterilyass29523 ай бұрын
❤❤❤❤
@Esau-d3hАй бұрын
How do you add methods to a constructer
@Sayne8082 ай бұрын
class game{ public: std::string gamename; int releasedate; game(std::string playername,int releasedate){ this->playername=playername; this->releasedate=releasedate; } };