C++ Code RunTime Error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

C++ Code RunTime Error

https://code.sololearn.com/c1K4hVuo9dKS/?ref=app Hello guys I getting an Error when try to use for loop to make objects in the main otherwise it works fine When creating objects speartly

18th Apr 2020, 2:06 PM
Mr Robot
Mr Robot - avatar
3 Answers
0
Could you pleasegive the input data parameter instead of input from keyboard?! I will check
18th Apr 2020, 3:25 PM
george
george - avatar
0
There are a lot of errors. First of all what is v[i], c[i] and etc under the loop. Wherethe definiton of d,c cd, as i understand it is array so you need define array with correct size and then useit or define class object and then add it to not fixed array(vector for example). Problem 2 why u use friend class definition for use variable from inherit classes. Istead of it variable chassasno set protected, and in this case all inherited classes will have possibility to set and get
18th Apr 2020, 3:33 PM
george
george - avatar
0
Fet data and display data in classes without * in parametera since friend func out of classes with* So may be you set your aim and i will help you to write a good(production) code
18th Apr 2020, 3:36 PM
george
george - avatar