0
asking about my simple code...
i just wanted to ask you guys to alert me if there are a better way to type this code... im just new at this so yea... its not that fancy thing but i need help to improve myself so i will be happy to hear some advices, rate it from 10 as a second code for me in this class,thanks. my code :- https://code.sololearn.com/cLHwkU7W3o89/#cpp
2 ответов
+ 2
Ặňặ Ǯǿmry MặƧđař Ặnśậk you can check with input validation... for example, distance between market to home should not be negative...
one more point is about method you have used to initialize member variables... it's not wrong but constructor should be used for this purpose
+ 1
Ketan Lalcheta thank you i will try to do something like that next.
about the part of my method ik that the constructor should be better but just now i have learned it i mean after i wrote my code already.
and yeah thank you a lot i appreciate your advices ^^.