Constructors and initializer lists | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Constructors and initializer lists

Having a bit of difficult grasping what these can be/are used for. Just looking for some general info on the subject. Ive tried a few things where I get errors like "cannot use object because its deleted" and it made me scrap the whole project because I had no clue what was going on. Although someone on cppforum posted clang errors and it seemed like I was missing something to do with the constructor. If anyones more interested in that particular problem let me know and I can post errors and whatnot. Any and all info appreciated!

29th Dec 2017, 12:51 PM
Noah
Noah - avatar
3 Réponses
+ 2
I guess you would need to include the code with your question before people can understand what you mean, and offer any suggestion : )
29th Dec 2017, 1:07 PM
Ipang
+ 1
Well, was the explanation and example in the lesson not clear enough to understand? which part of it exactly you're having problem with? I'm also a student here, but let's see, maybe I can do just a little help. I need to know how far you understand it on your part, and where you get stuck, maybe we'll start from there?
29th Dec 2017, 4:13 PM
Ipang
0
Asking about constructors/initilizer lists in general, not really specific to the problems in my code, was just throwing that out there :p
29th Dec 2017, 1:10 PM
Noah
Noah - avatar