Using OOP with any PLanguage like C++, help you in many ways, one is less bulks of codes. You can create a class for each concept that you think it's useful to be a class, then develop methods and variables for that and implement them. For example inheritance helps you for less coding.With OO design, Even if you have big codes, you can easily manage them, since they are separated and have no explicit connection with other parts(like methods).
But for having how many files like .cpp and .h, with classes you will put each one in a separate file and it'll decrease your file size also. Even if you have no classes, you can logically separate methods in some .cpp and .h files. It's important to write mothods every where you can, if you code without having any methods, it will cause disasters!
Anyway, if you now have some not classified or methodized code, it's definitely better to do that for your code now, becacuse later, you will have really big problems and maybe in a bad day, finally you get rid of that and code from scratch! To do so, first think of classes that you can create for your code, for ex : if you want to create a game, you can think of these as separated or connected or inherited classes : 'player' , 'enemy' , 'objects' that may appear in the scene, 'scoring system', 'menu', 'Artificial Intelligence', ... . Then you can easily define your class, then declare some methods. A little hard part is to separate code and then connect each part, e.g. calling a method with some params from a class, where you had previously some codes there. But after that you have many advantages, that you can see them in may articles on the web, some are : easily change codes, use codes without write them again, more understandable codes, less error prone, less sized files (your problem), and other benefits of OOP.
Modern Planguages (like C# , java , other .NET langs) are going closer and closer to be fully Object Oriented, and that really makes programming easier.
Now it's your choice, take a class or what!
Enter your message below
Sign in or Join us (it's free).