+ 1

Problems with classes

can someone please tell me what I am doing wrong creating these classes https://code.sololearn.com/cVIvP6Qc5Glm/#cpp

27th Jun 2017, 8:45 PM
Bryan
29 Respostas
27th Jun 2017, 10:21 PM
Manual
Manual - avatar
+ 1
what's avirtual function
27th Jun 2017, 9:24 PM
Bryan
+ 1
the book is good up until chapter 6 dealing with references. all of the concepts make sense but the tic tac toe example is confusing to me. beyond chapter 6 I can't figure anything out.
27th Jun 2017, 9:37 PM
Bryan
+ 1
https://code.sololearn.com/cHBTnR1sywn4/?ref=app I don't understand this class within a class. also I feel like even when I replicate their code with minor changes it fails. myFarm.Add(Critter("Moe"));
27th Jun 2017, 9:51 PM
Bryan
+ 1
I thought my job was hard. this crap is hard lol
27th Jun 2017, 9:55 PM
Bryan
+ 1
thanks for your help
27th Jun 2017, 9:55 PM
Bryan
+ 1
do you code for a living or are you a student
27th Jun 2017, 9:56 PM
Bryan
+ 1
your coffee makes sense to me easy even. it's the stuff in this book. it teaches stuff like your code then gives a ridiculous examples
27th Jun 2017, 10:03 PM
Bryan
+ 1
I've been trying to learn at work in spare time
27th Jun 2017, 10:08 PM
Bryan
+ 1
what kind of stuff do you code
27th Jun 2017, 10:08 PM
Bryan
+ 1
any books that you think would be useful or did you learn via internet
27th Jun 2017, 10:12 PM
Bryan
+ 1
I threw in a ton of linkes to recources, I got from others. I tend to copy examples from Youtube videos as well
27th Jun 2017, 10:18 PM
Manual
Manual - avatar
+ 1
thanks
27th Jun 2017, 10:23 PM
Bryan
0
The attack class is an issue. I would use virtual functions instead.
27th Jun 2017, 9:22 PM
Manual
Manual - avatar
0
Feel free to refer to this. Perfect world - a game sketch made of classes https://code.sololearn.com/cKi0cyBr24H2/?ref=app
27th Jun 2017, 9:23 PM
Manual
Manual - avatar
0
Its a special fuction that lets you override the super class function, that the child class inherits. It is in polymorph part of the cpp course. You should complete the course to get the info for reference.
27th Jun 2017, 9:30 PM
Manual
Manual - avatar
0
I have the e-book but, I have not read much of it , yet. I plan to start going through it when I have time.
27th Jun 2017, 9:45 PM
Manual
Manual - avatar
0
What about it are having trouble with?
27th Jun 2017, 9:46 PM
Manual
Manual - avatar