2 ms·
Take a look at Object Oriented Programming With ANSI-C. http://www.cs.rit.edu/~ats/books/ http://www.cs.rit.edu/~ats/books/ It is complicated, but you can tak
by arquivo 12y ago
Take a look at Object Oriented Programming With ANSI-C.
http://www.cs.rit.edu/~ats/books/ http://www.cs.rit.edu/~ats/books/
It is complicated, but you can take parts from it and built your own system.
- jesionaj 12y agoI've actually used a subset of that book for on an embedded system. It ended up being scrapped, partly due to project management issues and partly because we were writing twice as much code for very little benefit, so I can't say I recommend it for embedded projects. The need for malloc was a pretty big negative as well. That said, I would recommend it as a good learning experience.
- marvy 12y agowhy do you need malloc here?
- jesionaj 12y agoLooking the PDF over again you don't need malloc, that was a quirk of our implementation. We had separated public/private structs, meaning private variables were inaccessible by non-class methods (and thus also unable to be instantiated statically by other code modules.) (Our implementation was not very good.)