GitHub repository: nxtexe/OOCD.c
Primary language: C
Created: 2019-12-14T03:35:30Z
Description: An ugly example of what can loosely be called object oriented programming in C. I'm a junior dev so don't roast me XD. Purpose of the code is to shorten file I/O process in C, taking an object oriented approach. A struct object is created, a file pointer is also created. Pointer to struct is passed to open function, which also takes file path and I/O method as strings. Method read is used to read contents of the entire file and return the entire file as a string. Methods are created by using pointers to functions and assigning them as members of the struct. Code is essentially an implementation of a python like file object in C. It was fun to develop even though it's not that great a solution and likely breaks on anything that is not DevC++. :)